Java double
public class
JavaDoubleExample
{
public static void
main(String[] args)
{
double = ;
double d = 1232.44;
System.out.println("Value
of double variable d is :" + d);
}
}
Java float
import java.util.*;
public class
JavaFloatExample
{
public static void
main(String[] args)
{
float = ;
float f = 10.4f;
System.out.println("Value
of float variable f is :" + f);
}
}
Java int
public class JavaIntExamples
{
public static void main(String[] args)
{
int
= ;
int i = 0;
int j = 100;
System.out.println("Value of int variable
i is :" + i);
System.out.println("Value of int variable
j is :" + j);
}
}
Java long
import java.util.*;
public class JavaLongExample
{
public static void main(String[] args)
{
long = ;
long timeInMilliseconds = new
Date().getTime();
System.out.println("Time in
milliseconds is : " + timeInMilliseconds);
}
}
No comments:
Post a Comment