Created
January 30, 2022 18:28
-
-
Save 0x61nas/beced7d8239654508fd6a9a3bc755d1e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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