-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAssignment20.java
More file actions
27 lines (23 loc) · 886 Bytes
/
Assignment20.java
File metadata and controls
27 lines (23 loc) · 886 Bytes
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
package abhilash_Asignments;
//Default value of Global datatypes
public class Assignment20 {
static byte a = 10; // all the Globel variables are static
static short b = 1000;
static int c = 25;
static long d = 1000000L;
static float f = 3.14f;
static double g = 2.24515;
static char h = 'M';
static boolean i = true;
public static void main(String[] args) // main method inside the class
{
System.out.println("Default value of Byte : " + a);
System.out.println("Default value of Short : " + b);
System.out.println("Default value of Int : " + c);
System.out.println("Default value of Long : " + d);
System.out.println("Default value of Float : " + f);
System.out.println("Default value of Double : " + g);
System.out.println("Default value of Char : " + h);
System.out.println("Default value of Boolean : " + i);
}
}