Class SomeClass{ static { Thread t1 = new Thread(new Runnable() { @Override public void run() { System.out.println(abc); //works } }); Thread t2 = new Thread(() -> { System.out.println(SomeClass.abc); // ^-- now works }); t1.start(); t2.start(); } private static String abc = "test"; //declare after static block public static void main(String args[]) { System.out.println("main:" + DataAnalyseTest.abc); } }