Computer Science, asked by madhuthapa2006, 4 months ago

difference between string a[5] and string []​

Answers

Answered by dinesh5271
4

Answer:

String[] and String... are the same thing internally, i. e., an array of Strings. The difference is that when you use a varargs parameter ( String... ) you can call the method like: public void myMethod( String... foo ) { // do something // foo is an array (String[]) internally System

Answered by sharajsharma2007
2

Answer:

String [5] means declaring a string with length 5 and has an index number

String [ ] means declaring a string with variable length and will be assigned dynamically by Java

Please mark as brainliest and be my follower

Thank you

Similar questions