-
Notifications
You must be signed in to change notification settings - Fork 0
/
dataTypes.java
30 lines (22 loc) · 856 Bytes
/
dataTypes.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
30
public class dataTypes {
public static void main(String[] args) {
boolean myCheck = false;
System.out.println("Value of myCheck variable is " + myCheck);
byte myAge = 27;
System.out.println("My age is: " + myAge);
short num = 1800;
System.out.println("Value of num is: " + num);
int myIntNum = 124563;
System.out.println("Integer is: " + myIntNum);
long longNum = 1351554646;
System.out.println("Long num: " + longNum);
float myFloat = 45.63f;
System.out.println("Float Value: " + myFloat);
double myDouble = 4152.653;
System.out.println("double Value: " + myDouble);
char yn = 'Y';
System.out.println("Answer is: " + yn);
String course = "FSD";
System.out.println("Course name: " + course);
}
}