Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how do i make the loop of the highlighted part so that the program will still run to ask the user if they want to

how do i make the loop of the highlighted part so that the program will still run to ask the user if they want to choose again after doing case 1 or case 2 image text in transcribed
image text in transcribed
import java.util. public class collection public static void main(String ] args) dot String choice = input.next(); Scanner sc=new Scanner(System.in); String ch; System.out.println("1. Array List: "); System.out.println("2. Linked List: "); System.out.println("3. Vector: "); System.out.println("Enter your choice of number: "); int x=sc.nextInt(); swftch(x) System.out.println("Do like to choose agafn (Y/N)?"); while (choice.equals("Y") I choice.equalsignoreCase("yes")); case 1: ArrayList arrenew ArrayList (); System.out.printin("How many String do you want to add on the Array List: "); int pesc.nextInt(); System.out.println("Enter the string you want to add on the list: "); for (int 10; t= new Linkedlist(); System.out.println("How many String do you want to add on the linked List: "); int nesc.nextInt(); systen.out.println("Enter the string you want to add on the list: "); for(int **; i venew Vector(; System.out.println("How many String do you want to add on the vector: "); int nl-sc.nextInto; Systen.out.printin("Enter the string you want to add on the list: "); for(int =0; i<>

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

Step: 3

blur-text-image

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

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

Was there an effort to involve the appropriate people?

Answered: 1 week ago