Here is Java Program to print number given in the data types
Output of above Java Programs
public class second{ public static void main(String[] args){ int n; float fl; double d; n=50; fl=50.08f; d=12345.123; System.out.println("The given integer is = "+n); System.out.println("The given float is = "+fl); System.out.println("The given double is = "+d); } }
Output of above Java Programs
The given integer is = 50 The given float is = 50.08 The given double is = 12345.123