forked from AllenDowney/ThinkJavaCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArray.java
More file actions
18 lines (15 loc) · 490 Bytes
/
Array.java
File metadata and controls
18 lines (15 loc) · 490 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class Array
{
public static void main (String[]args)
{
String[]str = {"Much ", "More", " Java"};
int[] num = new int[3];
num[0] = 100;
num[1] = 200;
str[1] = "Better" ;
System.out.println( "String array length is " + str.length);
System.out.println( "Integer array length is " + num.length);
System.out.println( num[0]+ "," +num[1]+ "," + num[2]);
System.out.println(str[0]+ str[1]+ str[2]);
}
}