Run »
Main.java
Second.java
public class Main { int x = 5; }
class Second { public static void main(String[] args) { Main myObj = new Main(); System.out.println(myObj.x); } }
5