How to Create a Super Hello World Program in Java with Source Code

How to Create a Super Hello World Program in Java with Source Code (Free Java Tutorials and Source Code Examples).

👨‍💻 Here is my online course: Visual Basic .NET (VB.NET), Access Database and Crystal Reports Course.
🎯 Enroll now (Full lifetime access): http://bit.ly/2YRy99d

Screenshot-1:
Java - Super Hello World Program.

Screenshot-2:
Java - Super Hello World Program.

Java EP.1:
Download and Install Java JDK and NetBeans IDE on Windows 10.
YouTube 4K Video (Ultra HD)
https://youtu.be/h6rwRBT0AqA

Java EP.2: How to fix: NetBeans IDE. 
The default font size used in menus, dialogs, views, etc. is too small.
YouTube 4K Video (Ultra HD)
https://youtu.be/GH-nwmzVlUI

Java EP.3:
How to Create a Super Hello World Program in Java.

YouTube Part 1/2
4K Video (Ultra HD)

YouTube Part 2/2
4K Video (Ultra HD)

[FREE SOURCE CODE by iBASSKUNG]

#BEGIN

package javahelloworld2020;

/**
 *
 * @author iBasskung
 */

public class JavaHelloWorld2020 {

    /**
     * @param args the command line arguments
     */
 
    public static void main(String[] args) {
        // TODO code application logic here
     
        // Welcome to Java World.
     
        // This is single line comment.
     
        /*
            This is multi line comment.
            Please like and subscribe to my channel and
            press the bell icon to get new video updates.
        */
     
        // Print in the same line using print() Method.
        System.out.print("Begin: ");
        System.out.print("Java Tutorial for Beginners.");
     
        System.out.println(""); // Empty line.
     
        System.out.println("How to Create the Super Hello World Program.");
     
        System.out.println(""); // Empty line.
        // Note:
        // println() Method moves the cursor down to the next line
        // after displaying the message.
     
        // Declaring string variable.
        String hello;
     
        // Initializing string variable that's already been declared.
        hello = "Hello, World!";
     
        // Declaring and initializing string at one time.
        String happy = "Happy New Year";
     
        // Declaring and initializing an integer.
        int myIntYear = 2020;
     
        // Convert integer to string.
        String myStringYear = String.valueOf(myIntYear);
     
        // Print to the Output Window.
        System.out.println(hello + " " + happy + " " + myStringYear + ".");
        // Note: Concatenation using + operator.
     
        System.out.println(""); // Empty line.
     
        // Next: Java Array!
     
        // Declaring an array of strings.
        String[] strArr;
     
        // Allocating memory for 2 strings.
        strArr = new String[2];
     
        // Initialize the first elements of the array.
        strArr[0] = "Old Year";
     
        // Initialize the second elements of the array.
        strArr[1] = "New Year"; // Sorry :)
     
        // Print to the Output Window.
        System.out.println("Goodbye " + strArr[0] + ", Hello " + strArr[1] + ".");
     
        // Declaring and initializing an array of integers.
        int[] intArr = new int[] {2018, 2019, 2020, 2021, 2022};
        // Note: Array length = 5, first index = 0, last index = 4
     
        // Accessing Java Array elements via its index.
        int oldYear = intArr[1];
        int newYear = intArr[2];
        // Note: index 0: 2018, index 1: 2019, index 2: 2020 and so on...
     
        // Print to the Output Window.
        System.out.println("Goodbye " + oldYear + ", Hello " + newYear + ".\n");
        // Note: Using escape sequence (\n) to print new line.
     
        // Keyboard Shortcut.
        // Type sout then press TAB.
        System.out.println("'sout' : \"NetBeans IDE 8.0\" \'Keyboard Shortcut\'\n");
     
        // Type Sys then press Ctrl + SPACE after that press ENTER.
        System.out.println("Facebook Pages:");
     
        // Declaring and initializing a string array.
        String[] arrPage = new String[] {"Code A Minute.", "iBasskung Tutorial.", "Code with iBasskung."};
     
        // Check if an array is empty or not
        // using if..else..if Statement.
        if(arrPage == null){
            System.out.println("The array is null.");
        }else if(arrPage.length == 0){
            System.out.println("The array is empty.");
        }else{
         
            // Finding array length using length() Method.
            System.out.println("The length of the arrPage is " + arrPage.length + ".\n");
         
            // Loop through an array of strings using for loop.
            for(int i = 0; i < arrPage.length; i++){
             
                // Print the result to the screen.
                System.out.println((i + 1) + "." + arrPage[i]); 
             
            }
         
        }
     
        System.out.println(""); // Empty line. 
     
        System.out.println("YouTube Channels:");
     
        // Declaring and initializing a string array.
        String[] arrYouTube = {"iBasskung.", "iBasskung Tutorial.", "Tanin Sangngam."};
        // Note:
        // There is no need to write the new String[] part in the lates versions of Java.
     
        System.out.println("The length of the arrYouTube is " + arrYouTube.length + ".\n");
     
        // Loop through an array of strings using enhanced for loop (for each loop).
        int no = 0;
        for (String item : arrYouTube){
            no++;
            System.out.println(no + "." + item);
        } 
     
        System.out.println(""); // New line.
     
        System.out.println("Thanks so much for watching. Please subscribe to my channel.");
     
    }
 
}

#END

Follow me around
✔ Want to get updates on new courses or other cool free stuff? Just follow me on social media if that's your thing!

📺 Pages:

📺 YouTube:

📺 Udemy (Online Courses):

📺 Twitter:

📺 Blogger:

💯 THANK YOU SO MUCH 💯

#Java #JDK #NetBeans #HelloWorld #SuperHelloWorld 

Comments

Popular posts from this blog

How to Create an executable JAR file in NetBeans IDE (Java Source Code)

Accepting User Input using Scanner class (Java Source Code)