> Hey, I am facing a serious problem.I want to enter about 30 strings in an array. HOW CAN I DO IT?

Hey, I am facing a serious problem.I want to enter about 30 strings in an array. HOW CAN I DO IT?

Posted at: 2014-12-18 
C++: string a[50];

a[0] = "string 1";

a[1] = "string 2";

...etc.

Java: String[] a = new String[50];

a[0] = "string 1";

...etc. as above

Arrays are difficult to resize (local variable arrays are impossible to resize in C++) so allocate more room than you think you'll need. I picked 50 because it's greater than "about 30". You only need to use the first "about 30".

Keep a count and loop on that instead of the allocated array size, by the way.

Is this what you're talking about?

http://www.tutorialscollection.com/java-...

Google is your friend. Use it.