Java program to find the size of primitive data types
KW.java
Output
kodingwindow@kw:~$ javac KW.java
kodingwindow@kw:~$ java KW ——————————————————————————————————————————— Program to find the size of data types ——————————————————————————————————————————— Size of byte | 1 byte Size of short | 2 bytes Size of int | 4 bytes Size of long | 8 bytes Size of char | 2 bytes Size of float | 4 bytes Size of double | 8 bytes ——————————————————————————————————————————— kodingwindow@kw:~$
What Next?
Java program to calculate the area of a circle
Java program to perform the division of two numbers
Java program to swap the given numbers
Advertisement