Click to See Complete Forum and Search --> : Where do you type Java code?


omerhassan
06-09-2009, 10:21 AM
Hi

This is my first day learning Java so that should explain the stupid question.

I just downloaded Java (SE) Development Kit from java.sun.com. Now where do I type my code and how do I compile it and execute it and where do I see the output?

Thanks!

jam
06-09-2009, 05:58 PM
type your code in notepad.

Make sure your class name and file name are the same(e.g: )
myClass.java

public class myClass{
//other code
}


To compile call "javac [path to your .java file]"...
To see the output call "java [path to the created .class file]"...

Further info here: http://java.sun.com/developer/onlineTraining/Programming/BasicJava1/compile.html