DEV Community

nipun sanjula samarakoon
nipun sanjula samarakoon

Posted on

To create a class,

use the keyword class:

Main.java
Create a class named "Main" with a variable a:

public class Main {
int a = 5;//variable declaration
}

Top comments (0)