difference between string a[5] and string []
Answers
Answered by
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
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