![]() |
First Java Program
Java is fully OOP, it doesn’t work without class.
Initial stage we will use Note pad Example: class First { public static void main(String args[]) { System.out.println("Welcome to Java"); } } You have to save the java with same name you are using the class. e.g. First.Java You have to enclose the name with double quotations “ ” why? Because by default it takes the extension of three characters if you leave the Quotations it will save as First.Jav and its wrong To run the java program you have to install JDK 1.3 (or later) Java Development Kit. You have to save you file in C:\JDK\Bin\Fist.java To run go to Dos Type C:\>CD JDK C:\JDK>CD Bin C:\JDK\Bin> First you have to compile You have to invoke your java compiler. Javac is the Exe file. C:\JDK\Bin>Javac First.Java If there is no error you will return to the directory: First.Class is the byte-code. C:\JDK\Bin>Java First |
Welcome to the forums. I can see this is your first post.
Some pointers: - Read the rules and FAQ guide. - Put your code in <code> tags. This is the Java section, but from what you posted it looks like you have a small tidbit or tutorial. PM a moderator and asked to have it moved to the tutorials section. It won't last long in the java section with new threads. :) Enjoy. |
What the hell? :confused:
|
That was the worst tutorial I've read in a while. I feel like writing one now...
|
| All times are GMT -5. The time now is 1:18 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC