-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHelloWorld.java
More file actions
33 lines (26 loc) · 842 Bytes
/
HelloWorld.java
File metadata and controls
33 lines (26 loc) · 842 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
28
29
30
31
32
33
// Your First Program
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args) {
String testString = "testString";
char testChar = 'a';
int testInteger = 123;
boolean testBoolean = true;
double testDouble = 12.34;
float testFloat = 45.67f;
long testLong = 105L;
short testShort = 0;
byte testByte = 0;
Character testChar2 = null;
Integer testInteger2 = null;
Boolean testBoolean2 = null;
Double testDouble2 = null;
Float testFloat2 = null;
Long testLong2 = null;
Short testShort2 = null;
Byte testByte2 = null;
System.out.println("Hello, World!");
Scanner scanner = new Scanner(System.in);
System.out.println(scanner.nextLine());
}
}