Page 1 of 1

a java tutorial

Posted: Sat Nov 11, 2006 10:32 pm
by stephen10101
http://www.jcreator.com/download.htm - dl the second one, it is the free version of J creator

ok, i have done a search of this forum and there are no java tutorials, so i decided to make one. :D i MIGHT add on to this if i have the time, which i most likely will, and also if you say i should. so anyway, here is the tut.

first of all, you will need a compiler. i would recomend J creator, which you can google to find a download, because i forgot where i found it . :P
once you have that you open it. (what a shocker!) then go to file-new-java file and name it "Hello" i will say why later, and put it where you can find it, because starting over sucks. so now that you have it open and ready, enter this here code:

Code: Select all

Public class Hello
{
   public static void main (String[] args)
   {
      System.out.println("Hello World");
   }
}
COMPILE AND THEN EXECUTE!!!! "Hello World" should come up in a command prompt looking window.

now for the learning part. YAY!

Code: Select all

 Public class Hello 
looks for a file named "Hello.java" and that is why you named it that. the first bracket/curly brace/brace (whatever you call it) is for the starting point. that is what the

Code: Select all

 [public static void main (String[] args) 
does. in the second set, is the program statements. the

Code: Select all

System.out.println("Hello World");
puts "Hello World" on the command prompt looking thing, and well the closing brackets close the brackets. :roll: so now you know how to make a program in java! i bet you are happy. like i said, i might continue writing these.

Posted: Sun Nov 12, 2006 12:28 am
by dos mes
I believe you can get a free compiler from Sun themselves if I'm not mistaken. I'd stick with that one.

Posted: Tue Feb 13, 2007 12:19 pm
by infectious
yeh you can.
wooo go solarus and java.