Skip to content

Instantly share code, notes, and snippets.

Created January 30, 2022 18:28
What would you like to do?
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