-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestJava.java
More file actions
23 lines (21 loc) · 1.06 KB
/
testJava.java
File metadata and controls
23 lines (21 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
// IsJavaInstalled.java
public class testJava {
public static final String ANSI_RESET = "\u001B[0m";
public static final String ANSI_GREEN = "\u001B[32m";
private static final String successMessage = """
_ _ ___ _ _ _ _ _\s
| | __ ___ ____ _ (_)___ |_ _|_ __ ___| |_ __ _| | | ___ __| | |
_ | |/ _` \\ \\ / / _` | | / __| | || '_ \\/ __| __/ _` | | |/ _ \\/ _` | |
| |_| | (_| |\\ V / (_| | | \\__ \\ | || | | \\__ \\ || (_| | | | __/ (_| |_|
\\___/ \\__,_| \\_/ \\__,_| |_|___/ |___|_| |_|___/\\__\\__,_|_|_|\\___|\\__,_(_)""";
public static void main(String[] args) {
try {
System.setOut(new PrintStream(System.out, true, "UTF-8"));
System.out.println(ANSI_GREEN + successMessage + ANSI_RESET);
} catch (UnsupportedEncodingException e) {
System.out.println("Java is installed!");
}
}
}