(String[] args)
| 1 | class Primitives { |
| 2 | |
| 3 | public static void main(String[] args) { |
| 4 | int i100 = 100; |
| 5 | int i101 = 101; |
| 6 | int sum = i100 + i101; |
| 7 | |
| 8 | A a1 = new A(); |
| 9 | int x = a1.i1; |
| 10 | A a2 = new A(); |
| 11 | a2.i2 = 666; |
| 12 | int y = a2.i2; |
| 13 | |
| 14 | double z = id(3.14159); |
| 15 | } |
| 16 | |
| 17 | static double id(double n) { |
| 18 | return n; |