Run ❯
Get your
own Java
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
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