mirror of
https://github.com/FranzHaidnor/haidnorJVM.git
synced 2026-03-14 06:03:50 +08:00
add banner
This commit is contained in:
@@ -23,6 +23,16 @@ public class Main {
|
||||
|
||||
@SneakyThrows
|
||||
public static void main(String[] args) {
|
||||
String banner = """
|
||||
░░ ░░ ░░░░░ ░░ ░░░░░░ ░░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░ ░░ ░░░ ░░░\s
|
||||
▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒\s
|
||||
▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒\s
|
||||
▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓\s
|
||||
██ ██ ██ ██ ██ ██████ ██ ████ ██████ ██ ██ █████ ████ ██ ██\s
|
||||
""";
|
||||
|
||||
System.out.println(banner);
|
||||
|
||||
CommandLine cmd = initCommandLine(args);
|
||||
|
||||
// 指定从 .jar 文件运行
|
||||
|
||||
@@ -4,6 +4,8 @@ import java.util.Stack;
|
||||
|
||||
/**
|
||||
* JVM 线程
|
||||
* <p>
|
||||
* 目前这个 JVMThread 并没有真的被 start() 开启, 不继承 Thread 也可以
|
||||
*
|
||||
* @author wang xiang
|
||||
*/
|
||||
|
||||
@@ -67,6 +67,11 @@ public class TestJVM {
|
||||
runMainClass(Demo7.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_8() throws Exception {
|
||||
runMainClass(Demo8.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void demo_while() throws Exception {
|
||||
runMainClass(demo_while.class);
|
||||
@@ -104,11 +109,6 @@ public class TestJVM {
|
||||
// runMainClass(demo_foreach_3.class);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test_8() throws Exception {
|
||||
runMainClass(Demo8.class);
|
||||
}
|
||||
|
||||
@Test(expected = ArithmeticException.class)
|
||||
public void demo_exception_1() throws Exception {
|
||||
runMainClass(demo_exception_1.class);
|
||||
@@ -175,5 +175,16 @@ public class TestJVM {
|
||||
public void test_Array() throws Exception {
|
||||
runMainClass(Array.class);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void test_() throws Exception {
|
||||
long longNum = 922337203685477580L; // Long Max
|
||||
|
||||
int[] arr = new int[2];
|
||||
arr[0] = (int) (longNum >> 32); // 获取高位部分
|
||||
arr[1] = (int) (longNum & 0xFFFFFFFFL); // 获取低位部分
|
||||
|
||||
long result = ((long) arr[0] << 32) | ((long) arr[1] & 0xFFFFFFFFL);
|
||||
System.out.println(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user