Exemplo n.º 1
0
 public static void main(String[] args) {
   StaticClass sc1 = new StaticClass();
   StaticClass ac2 = new StaticClass();
   sc1.x = 12;
   sc1.a = "hello";
   ac2.a = "jot";
   System.out.println("sc integer:" + sc1.x);
   System.out.println("sc String:" + sc1.a);
   System.out.println("ac integer:" + ac2.x);
   System.out.println("ac STring:" + ac2.a);
 }
Exemplo n.º 2
0
 public void testAdd() {
   // Don't actually test but do invoke the method
   StaticClass.sum(new int[] {1, 2, 3});
 }