add banner

This commit is contained in:
wangxiang
2023-08-22 10:28:37 +08:00
parent 598a3b184d
commit 16b2fdca89
3 changed files with 29 additions and 6 deletions

View File

@@ -23,6 +23,16 @@ public class Main {
@SneakyThrows @SneakyThrows
public static void main(String[] args) { public static void main(String[] args) {
String banner = """
░░ ░░ ░░░░░ ░░ ░░░░░░ ░░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░ ░░ ░░░ ░░░\s
▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒▒▒\s
▒▒▒▒▒▒▒ ▒▒▒▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒▒▒ ▒▒ ▒▒ ▒▒ ▒▒ ▒▒▒▒ ▒▒\s
▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓ ▓▓\s
██ ██ ██ ██ ██ ██████ ██ ████ ██████ ██ ██ █████ ████ ██ ██\s
""";
System.out.println(banner);
CommandLine cmd = initCommandLine(args); CommandLine cmd = initCommandLine(args);
// 指定从 .jar 文件运行 // 指定从 .jar 文件运行

View File

@@ -4,6 +4,8 @@ import java.util.Stack;
/** /**
* JVM 线程 * JVM 线程
* <p>
* 目前这个 JVMThread 并没有真的被 start() 开启, 不继承 Thread 也可以
* *
* @author wang xiang * @author wang xiang
*/ */

View File

@@ -67,6 +67,11 @@ public class TestJVM {
runMainClass(Demo7.class); runMainClass(Demo7.class);
} }
@Test
public void test_8() throws Exception {
runMainClass(Demo8.class);
}
@Test @Test
public void demo_while() throws Exception { public void demo_while() throws Exception {
runMainClass(demo_while.class); runMainClass(demo_while.class);
@@ -104,11 +109,6 @@ public class TestJVM {
// runMainClass(demo_foreach_3.class); // runMainClass(demo_foreach_3.class);
} }
@Test
public void test_8() throws Exception {
runMainClass(Demo8.class);
}
@Test(expected = ArithmeticException.class) @Test(expected = ArithmeticException.class)
public void demo_exception_1() throws Exception { public void demo_exception_1() throws Exception {
runMainClass(demo_exception_1.class); runMainClass(demo_exception_1.class);
@@ -176,4 +176,15 @@ public class TestJVM {
runMainClass(Array.class); 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);
}
} }