Here is Java Program to print number given in the data types
Output of above Java Programs
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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