Source of TestStuff20170110.java


  1: //TestStuff20170110.java
  2: 
  3: import java.lang.System;
  4: 
  5: public class TestStuff20170110
  6: {
  7:     public static void main(String[] args)
  8:     {
  9:         int i; //declaraation
 10:         int j = 7; //initialization
 11:         i = 3; //assignment
 12: 
 13:         float d = (float)3.14;
 14:         float e = 3.14f;
 15:         System.out.println(d);
 16:         System.out.println(e);
 17: 
 18:         System.out.println((int)'A');
 19:         System.out.println((char)67);
 20:         
 21:         System.out.println(17 / 5);
 22:         System.out.println(17 % 5);
 23: 
 24:         int n = 6;
 25:         ++n;
 26:         n++;
 27:         System.out.println(n);
 28:         --n;
 29:         n--;
 30:         System.out.println(n);
 31:         System.out.println(++n);
 32:         System.out.println(n++);
 33:         System.out.println(n);
 34: 
 35:         String s = new String("Hello");
 36:         String s1 = "Hello";
 37: 
 38:         String s2 = "Hello";
 39:         s2.toUpperCase();
 40:         System.out.println(s2);
 41:     }
 42: }