Back To Home

Tutorial #2

Learning basic coding

First start by pasting this code under the line of code that says public class: public static void main(String[] args) { then move down a few lines and put }. These brackets are start and endings in Java coding so you will will always finish an If then statement with these.

First let's start with the most basic string of code you can write in Java. System.out.println("Test"); This is the first code you will learn. Lets go over this so you understand it. First, there is System which is refrencing your computer. After that we are saying out because we want output then we say println to print then in ("YOU CAN TYPE HERE"). Remember to keep the code with the same capital letters as shown here or it will not run. Now that you know what the code means try typing it in your Eclipse window without looking at this website. It's ok if you need to look back here but try to memorize it. When you have it typed in just press the green play button at the top and in the output at the bottom of your screen it should look like this:

Now that you know your first line of code you are ready for Tutorial #3 which is in my opinion the most important tutorial in all of learning Java.