public class ExampleObj { int x; // Create a class constructor for the Main class public ExampleObj() { x = 5; } public static void main(String[] args) { ExampleObj myObj = new ExampleObj(); System.out.println(myObj.x); } }