Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old May 22nd, 2006, 3:26 PM   #1
duale2005
Newbie
 
Join Date: May 2006
Posts: 1
Rep Power: 0 duale2005 is on a distinguished road
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 
duale2005 is offline   Reply With Quote
Old May 22nd, 2006, 3:41 PM   #2
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 719
Rep Power: 12 Booooze is on a distinguished road
Send a message via MSN to Booooze
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.
Booooze is offline   Reply With Quote
Old May 22nd, 2006, 3:55 PM   #3
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 661
Rep Power: 13 Jessehk is on a distinguished road
What the hell?
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old May 22nd, 2006, 6:17 PM   #4
ReggaetonKing
Pro
 
ReggaetonKing's Avatar
 
Join Date: Nov 2005
Location: NJ
Posts: 894
Rep Power: 13 ReggaetonKing is on a distinguished road
Send a message via AIM to ReggaetonKing
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!
ReggaetonKing is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:53 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC