Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
An example of a class Main - Person
class Main {
public static void main(String[] args) {
// person1 object is of type Person
Person person1 = new Person();
person1.walk(); // person1 walks
// person2 object is of type Person
Person person2 = new Person();; // person2 talks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment