Check out example codes for "java create clas". It will help you in understanding the concepts better.

Code Example 1

public class MyClass {
  int x = 5;

  public static void main(String[] args) {
    MyClass myObj = new MyClass();
    System.out.println(myObj.x);
  }
}

Learn ReactJs, React Native from akashmittal.com