Java Programming Part2(Text and Running)

In your java.java you should have the code -

public class java {
public static void main(String args[]){

}

}

So if we are going to make java programs we need text and the code for a simple line of text is -

System.out.println("Hello Java programming");

In the console it will display the words 'Hello Java programming' so if you combine the println with the public void you get this -

public class java {
public static void main(String args[]){

System.out.println("Hello Java programming");

}

}

Awesome, but now to run the code just click the little green triangle in the top and it will say 'Hello Java programming' if this worked you have just created your first java program. THAT IS AWSOME I hope that you will continue to learn java so you can be on your way to create great games like Minecraft (and yes minecraft was made with java).

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Share

    Recommendations

    • Indoor Lighting Contest

      Indoor Lighting Contest
    • Make It Fly Challenge

      Make It Fly Challenge
    • Growing Beyond Earth Maker Contest

      Growing Beyond Earth Maker Contest

    Discussions

    0
    None
    seamster

    4 years ago on Introduction

    Thanks for sharing your tutorials on how to code Java!