- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharray_1.java
More file actions
Latest commit
27 lines (22 loc) · 706 Bytes
/
Copy patharray_1.java
File metadata and controls
27 lines (22 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
importjava.lang.StackWalker.Option;
publicclassarray_1 {
publicstaticvoidmain(String[] args) {
/*
* classroom 500 student so store the marks of foo student
* so we have two Option
* 1- make 500 variables
* 2- make array of 500 size
*/
/* declaration and memory allocation
int[] marks = new int[5];
System.out.println("the marks is ");
marks[0] = 35;
marks[1] = 45;
marks[2] = 95;
marks[3] = 26;
marks[4] = 89;
System.out.println(marks[4]);*/
int [] marks = {100, 123, 451, 451, 124};
System.out.println(marks[3]);
}
}