In this example we will show the method to create public class in Java.
Source Code
package com.beginner.examples;
public class PublicClass { // public
public static void main(String[] args) {
System.out.println("OK!");
}
}
Output:
OK!