JAVA PROGRAMMING
Declare an array variable (not a populated array, numbers only) for
each of the following situations.
a)
The following array can be declared as:-
String fname[] = new String[10];
In this 10 String values can be entered.
b)
The following array can be declared as:-
String name[][] = new String[5][2];
Here, there are 5 rows with 2 columns each.
In the first column user can enter first name and second column can store last name;
c)
The following array can be declared as:-
String assign[][] = new String[5][10];
In this, there are 5 rows for each student's last name and 10 column for respective student's assignment or array.
Note:- Please comment down if you face any problem. :)
Get Answers For Free
Most questions answered within 1 hours.