local class sample in java
This file contains 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
| public class LocalClassSample { | |
| public static void main(String[] args) { | |
| class Utils { | |
| public void printHello(String name) { | |
| System.out.println("Hello " + name); | |
| } | |
| } | |
| Utils util = new Utils(); | |
| util.printHello("World"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment