-
Notifications
You must be signed in to change notification settings - Fork 0
/
DefaultValue.java
29 lines (28 loc) · 893 Bytes
/
DefaultValue.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/** A java program to print the default values of all data types
@author Dr. Anand Kumar Pandey
*/
class DefaultValue
{
private static byte b;
private static short s;
private static int i;
private static long l;
private static float f;
private static double d;
private static char ch;
private static boolean bln;
public static void main(String[] args)
{
System.out.println(" Default values of java Data types ");
System.out.println("--------------------------------------");
System.out.println("Byte :: "+b);
System.out.println("Short :: "+s);
System.out.println("Integer :: "+i);
System.out.println("Long :: "+l);
System.out.println("Float :: "+f);
System.out.println("Double :: "+d);
System.out.println("Char :: "+ch);
System.out.println("Boolean :: "+bln);
System.out.println("--------------------------------------");
}
}