Skip to content

Commit 68b6ac3

Browse files
committed
feat: Access and print a specific element from an integer array
🧠 Logic: - Declares and initializes an integer array with 7 elements. - Prints the element at index 2 (which is the third element, value 3). Signed-off-by: Somesh diwan <[email protected]>
1 parent f52f170 commit 68b6ac3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Section9ArrayAB/Array IMP/ArrayCC.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
public class ArrayCC
2-
{
3-
public static void main(String[] args)
4-
{
1+
public class ArrayCC {
2+
public static void main(String[] args) {
53
int[] num = {1,2,3,4,5,6,7};
64
System.out.println(num[2]);
75
}

0 commit comments

Comments
 (0)