1、修饰方法、变量
2、修饰代码块
3、静态内部类
4、静态导包
package com.shob.oth;import java.util.Objects;import static java.lang.System.out;public class Other { static{ System.out.println("12331"); } private static String st = "xx"; public static void main(String[] args) { int a =0,b=0; System.out.println(Objects.equals(a, b)); out.println("123"); for (int i = 0; i < 2; i++) { a+=i; System.out.println(i); } Tes tes = new Tes(); tes.setIak("1"); tes.setIdk("2"); String s = "1"; String s1 = "1"; System.out.println(Objects.toString(tes)); System.out.println(Objects.deepEquals(s, s1)); SClazz sc = new SClazz(); } static class SClazz{ static{ System.out.println("12"); } } }