Skip to content

Instantly share code, notes, and snippets.

@0x61nas
Created January 30, 2022 18:28
Show Gist options
  • Save 0x61nas/beced7d8239654508fd6a9a3bc755d1e to your computer and use it in GitHub Desktop.
Save 0x61nas/beced7d8239654508fd6a9a3bc755d1e to your computer and use it in GitHub Desktop.
class Scratch {
// This method has the same name as the class and have the return type
public int Scratch() {
return 0;
}
}
class Main {
public static void main(String[] args) {
Scratch s = new Scratch();
int a = s.Scratch(); // This is a call to the method Scratch()
System.out.println("The program has finished");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment