Computer Applications

Write Java statements for the following:

(a) Initialise the array with the three favourite subjects.
(b) Declare an array to store the marks in 3 subjects of 40 students.

Java Arrays

1 Like

Answer

(a) String subjects[] = {"Maths", "Science", "English"};

(b) int marks[][] = new int[40][3]; or int marks[][] = new int[3][40];

Answered By

1 Like


Related Questions