What is the purpose of using String a[] in Java

Showing Answers 1 - 6 of 6 Answers

John

  • Jun 13th, 2007
 

String a[] gives you an array of strings.

String a[] = new String[10] gives you an array of 10 strings with the index starting at 0 and going through 9.

  Was this answer useful?  Yes

kiran378

  • May 5th, 2010
 

To Provide Command Line Arguments.
for example let us take Bubble Sort, it can sort either ascending or descending.
now we can invoke class BubbleSort as 

java BubbleSort -asc      // -asc  for Ascending.
java BubbleSort -dsc      // -dsc  for Descending.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions