![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2006
Posts: 1
Rep Power: 0
![]() |
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 |
|
|
|
|
|
#2 |
|
Expert Programmer
|
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. |
|
|
|
|
|
#3 |
|
The Oblivious One
Join Date: May 2005
Location: Ontario, Canada
Posts: 648
Rep Power: 4
![]() |
What the hell?
![]()
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS! |
|
|
|
|
|
#4 |
|
Sexy Programmer
|
That was the worst tutorial I've read in a while. I feel like writing one now...
__________________
I would love to change the world, but they won't give me the source code! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|