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 Box { | |
| private int length, width, height; | |
| public Box(int length, int height, int width) { | |
| this.length = length; | |
| this.height = height; | |
| this.width = width; |
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 DemoClass { | |
| //public function | |
| void printSomething(){ | |
| print('Something'); | |
| } |
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
| //Notice no access specifier (public, private) or static keyword | |
| main() { | |
| //Top-level function | |
| print('Hello World'); | |
| } |
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
| print("Hello World!") |
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 Main{ | |
| public static void main(String... args) { | |
| System.out.println("Hello World!"); | |
| } | |
| } |
NewerOlder