Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 points Save Answer Write a Java program that uses ArrayList and Iterator. It should input from user the names and ages of your

 

2 points Save Answer Write a Java program that uses ArrayList and Iterator. It should input from user the names and ages of your few friends in a loop and add into ArrayList. Finally, it should use Iterator to display the data in a proper format. [Hint-Lecture 02: Slide 8] Sample output: List of my Friends Enter name and age [friend## 0] Khalid Al-shamri 22.5 Do you want to add another friend (y/n)? y Enter name and age [friend# 1] Rahsed Al-anazi 21.1 Do you want to add another friend (y/n)? y Enter name and age [friend# 2] Salem Al-mutairi 23.7 Do you want to add another friend (y/n)? n Here is the data you entered: 0. Khalid Al-shamri, 22.5. 1. Rahsed Al-anazi, 21.11 2. Salem Al-mutairi, 23.7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

An Introduction To Network Programming With Java

Authors: Jan Graba

3rd Edition

1447152530, 978-1447152538

More Books

Students also viewed these Programming questions