package com.jmdf.redis.project.jvm;
import java.util.UUID;
public class MyTest2 {
public static void main(String[] args) {
System.out.println(MyParent2.str1);
System.out.println("================");
System.out.println(MyParent2.str);
}
}
class MyParent2 {
public static final String str = UUID.randomUUID().toString();
public static final String str1 = "hello";
static {
System.out.println("MyParent static block");
}
}
hello
================
MyParent static block
eea5868a-e822-4e2e-8bb6-684218741dea
Process finished with exit code 0