Tutorial 3: float, long and double data types
package tutorial;
public class Fractional {
public static void main(String[] args) {
//3.14 double
//3.24f float
float fNum = 3.24f;
double dNum = 1.09999999999;
long lNum = 222222222L;
System.out.println("Value of Float number is:" + fNum);
System.out.println("value of double variable is:" + dNum);
System.out.println("value of long varialbe is:" + lNum);
}
}
public class Fractional {
public static void main(String[] args) {
//3.14 double
//3.24f float
float fNum = 3.24f;
double dNum = 1.09999999999;
long lNum = 222222222L;
System.out.println("Value of Float number is:" + fNum);
System.out.println("value of double variable is:" + dNum);
System.out.println("value of long varialbe is:" + lNum);
}
}
No comments:
Post a Comment