is it possible to add and remove elements in ArrayList dynamically while run time from command prompt

Recommended Answers

All 2 Replies

I'm guessing you don't mean by way of an interactive menuing system, since that's the obvious answer to your question. What exactly are you trying to accomplish?

are you trying to add/remove something to/from your arraylist while your program is running ? like read something from the console , parse it as a string and add it to your string type arraylist ? if so , then yes. that is quite a normal usage.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.