
public class Test13_Pereda_int {
 public static void main(String [] args) {
 int num1,num2;
 num1 = 5;
 num2 = 10;
 System.out.println("Variable num1 is equal to " +num1);
 System.out.println("Variable num1 is equal to " +num2);
    }
}
===================================================================
Float and Double Data type
public class Test14_Pereda_doublefloat {
 public static void main(String [] args) { 
 float num1 = 87.45f;
 double num2 = 97.67;
 System.out.println("Variable Num1: " + num1);
 System.out.println("\n\nVariable Num1: " + num2);
 } 
}
============================================
Long Data Type 
===========================================
public class Test15_Pereda_long {
 public static void main(String [] args) { 
 long num1 = 4353454443434233432L;
 System.out.println("Value of Num1: " + num1);
    } 
}
========================================
Boolean Data type 
========================================
public class Test16_Pereda_boolean {
 public static void main(String [] args) {  
 boolean x = true;
 boolean y = false;
 System.out.println("Value of x: " +x);
 System.out.println("\n\nValue of y: " +y);
     }
}
===========================================



Walang komento:
Mag-post ng isang Komento