KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > Constants


1 public class Constants {
2     
3     public static void main (String JavaDoc [] args) {
4         int i = 3 + 4 + 5 + 7;
5         int j = -(3 + 4);
6         System.out.println(i);
7         System.out.println(j);
8         int [] arr = new int [] {3, 4, 5, 4, 5, 8, 4};
9         System.out.println(arr[1+1+1]);
10         System.out.println(!false);
11         switches(1+4+5);
12     }
13
14     public static void switches(int i){
15         switch (i){
16             
17             case 3+7: {System.out.println(10); break;}
18         }
19     }
20 }
21
Popular Tags