Moagi
asked on
Running Java.
I am new in Java, I am stil learning its constructs.
I will like to know how to run a program in Java.
I only know a bit of pascal, and I will like to know Java, hope you will provide me with steps followed as well as a short program to practice on.
I will like to know how to run a program in Java.
I only know a bit of pascal, and I will like to know Java, hope you will provide me with steps followed as well as a short program to practice on.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Well the emphasis on the filename, the name of the class
steps on how to run and deburg are well illucidated. But I would like to undersand what does the word class result or basically mean.ie does it mean an entity or is just a name choosen by the programmer?
steps on how to run and deburg are well illucidated. But I would like to undersand what does the word class result or basically mean.ie does it mean an entity or is just a name choosen by the programmer?
Why B man?
for an introduction to java have a look at this
http://www.ibiblio.org/javafaq/course/index.html
and for some short programs and goog tutorials go to
http://java.sun.com/docs/books/tutorial/
if you download a JDK i think the latest is 1.4.0
to compile from command prompt write
javac filename.java
and to run the program
java filename
in java your filename has to be the same as the class name
like if you have
class HelloWorldApp {
public static void main(String[] args) {
System.out.println("Hello World!"); //Display the string.
}
}
your filename has to be HelloWorldApp.java
when you compile it you will see another file with the same name but .class that is the bytecode when you run it you dont put the .class just the file name after "java".