-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMain.java
More file actions
38 lines (28 loc) · 1.01 KB
/
Main.java
File metadata and controls
38 lines (28 loc) · 1.01 KB
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
28
29
30
31
32
33
34
35
36
37
38
package AutoBoxing;
import java.util.ArrayList;
/**
* Created by robertsg on 12/11/2015.
*/
public class Main {
public static void main(String[] args) {
String[] strArray = new String[10];
int[] intArray = new int[10];
ArrayList<String> strArrayList = new ArrayList<>();
strArrayList.add("Tim");
ArrayList<IntClass> intClassArrayList = new ArrayList<>();
intClassArrayList.add(new IntClass(54));
Integer integer = new Integer(54);
Double doubleValue = new Double(12.25);
ArrayList<Integer> intArrayList = new ArrayList<>();
Integer myIntValue = 56;
int myInt = myIntValue.intValue();
ArrayList<Double> myDoubleValues = new ArrayList<>();
for (double dbl = 0.0; dbl <= 10.0; dbl += 0.5) {
myDoubleValues.add(dbl);
}
for (int i = 0; i < myDoubleValues.size(); i++) {
double value = myDoubleValues.get(i);
System.out.println(i + " --> " + value);
}
}
}