0
What else "new" used to define except array's capacity- number of elements in array?
What "new" used for?
2 odpowiedzi
+ 3
"new" is used to create objects.
String[] x = new String[10];
Here I am creating 10 String refrenece variables that can store a String value.
You access each one like so...
x[0] = "Hello";
x[1] = "World";
+ 2
Thank you! Great!