
/** 
 Program: 	EssentialCasting
 Purpose: 	simple demonstration of Java operators.
 @author 	john@december.com 
 @version	1.02; 21 July 1995
 */

class EssentialCasting {

   public static void main (String args[]) {

      int     myInteger   = 42;
      float   myReal      = 3.987;
      boolean myTruth     = true;  
      String  aPhrase;
      float   aReal;
      float   anInteger;

      anInteger = (int)myReal;               // floating to integer
      System.out.println(anInteger);    

      aReal = myInteger + 0.001;             // floating expression
      System.out.println(aReal);  

      aPhrase = "Survey says: " + myInteger; // integer to string
      System.out.println(aPhrase);

      aPhrase = "Survey says: " + myTruth;   // boolean to string
      System.out.println(aPhrase);

   }
}
