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
| package sample; | |
| import javafx.application.Application; | |
| import javafx.scene.Scene; | |
| import javafx.scene.control.Label; | |
| import javafx.scene.layout.BorderPane; | |
| import javafx.stage.Stage; | |
| public class HelloWorldJavaFX extends Application { |
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
| package sample; | |
| import javax.swing.JFrame; | |
| import javax.swing.JLabel; | |
| public class HelloWorldSwing extends JFrame { | |
| public static void main(String[] args) { | |
| new HelloWorldSwing().init(); |
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
| package sample; | |
| import java.applet.Applet; | |
| import java.awt.Graphics; | |
| public class HelloWorldApplet extends Applet { | |
| public void paint(Graphics g) { | |
| g.drawString("Hello World.", 10, 10); |
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
| package sample; | |
| public class HelloWorldPrintf { | |
| public static void main(String[] args) { | |
| System.out.printf("%s %s", "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
| package sample; | |
| public class HelloWorldStringBuilder { | |
| public static void main(String[] args) { | |
| StringBuilder sb = new StringBuilder(); | |
| sb.append("Hello"); | |
| sb.append(" "); | |
| sb.append("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
| package sample; | |
| public class HelloWorldString { | |
| public static void main(String[] args) { | |
| String s = "Hello World."; | |
| System.out.println(s); | |
| } |
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
| package sample; | |
| public class HelloWorldStandard { | |
| public static void main(String[] args) { | |
| System.out.println("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
| package sample; | |
| public class HelloWorldReverse { | |
| public static void main(String[] args) { | |
| char[] chars = {0x02D9, 0x0070, 0x006C, 0x006F, 0x0279, 0x004D, 0x0020, 0x006F, 0x006C, 0x006C, 0x0259, 0x0048}; | |
| System.out.println(new String(chars)); |
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
| package sample; | |
| public class HelloWorldPrint { | |
| public static void main(String[] args) { | |
| System.out.print("Hello"); | |
| System.out.print(" "); | |
| System.out.print("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
| package sample; | |
| public class HelloWorldChar { | |
| public static void main(String[] args) { | |
| char[] chars = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', '.'}; | |
| System.out.println(chars); |
NewerOlder