Home Computer & Gadgets | Automobiles | Sports | Audio Visual Entertainment | Fashion & Jewelry | Love n Dating
  Technology Art, Design & Paintings | Funny/Strange Pictures | Celebrities Xposed | Humor, Jokes, Riddles | Astrology
  Mobile Health & Fitness | Recipe Corner | Travel Tourism | Mobile Phone Reviews | Sms Collection | The Music Mania
Friendship SMS Photo Shoots, Magazines, FHM, Maxim, Vogue, Filmfare, Famina MagXone  Latest Topics   Chat   RegisterRegister   Log inLog in 

How to Start Java Programming

Post new topic   Reply to topic    Home -> Science & Technology Zone -> Programming
Goto Previous Topic   Goto Next Topic  
Author Message Share and Tell Friends
itslucky
Fun Addict
Fun Addict


Joined: 14 Jan 2009
Posts: 912
Gender: Male
Location: Heart of my Carbon Copy
PostPosted: Apr 24, 2009   Topic Views : 990   Post subject: How to Start Java Programming Reply with quote

My Dear, for java development, u didn't need any of the large compiler or the programs

* Java is just three steps

1. write a java program ( u can also write ur code in Notepad)

2. compile it

3. Run on any Machine

for the developers:

u need the Java JDK (Java Development Kit) u can download it from

http://java.sun.com/products/archive/j2se/6u6/index.html

u can also write ur code in Notepad, but the IDEs alsways the best choice because they are very usefull ( to correct ur typing/syntax error )


so here is the link of one of the IDE (Netbeans)

http://www.netbeans.org/downloads/

*The IDE is not so important to be with you (but it is Best to be with you)*

Now u have all the tools, lets Dirty ur hands with the Java Coding Razz
| More Share
Back to top  
itslucky
Fun Addict
Fun Addict


Joined: 14 Jan 2009
Posts: 912
Gender: Male
Location: Heart of my Carbon Copy
PostPosted: Apr 24, 2009     Post subject: Write ur FIRST JAVA PROGRAM Reply with quote

According to me (Lucky), in any of the programming language we must know about following three things

1. How to print info on Screen?

2. How to take input?

3. How to print the taken inputs?

so now lets start with the Step 1: (Print Info on Screen)

1. open the notepad

2. type/copy the following code

////////////////////////////////////


public class myprogram {

public static void main(String args[])
{
System.out.println("Hi...!!! Welcome to my First Program in Java...");
}

}

///////////////////////////////////



How to Start Java Programming


3. now save the code to the

>>> C:\Program Files\Java\jdk1.6.0_06\bin

(The place where your JDK is installed {above is the dafault location} )



How to Start Java Programming

NOTE:
in the above pic when i type the name of program, it is the same name as the name of my class in the code..

and i have type "" double quotes and in them i type "myprogram.java"

now save it.

4. Now lets Compile and run the code

Open Run from Start Menu (or Shortcut key "win+R")

and type

CMD

hit enter, and goto the following location

C:\Program Files\Java\jdk1.6.0_06\bin

by typing as the following picture

then compile and run the code



How to Start Java Programming

In the above pic

To compile the code:

we type

>> javac myprogram.java (hit Enter)

then execute the compiles program

>> java myprogram (hit enter)

////////////////////////////////
from the above, I think u people now print any text on the screen

just edit the

>>System.out.println("Hi...!!! Welcome to my First Program in Java...");

line and thats it...
Back to top  
chandoo
Ultimate Contributor
Ultimate Contributor


Joined: 08 Sep 2007
Posts: 4168
Gender: Male
Location: Lahore
PostPosted: Apr 24, 2009     Post subject: Reply with quote

so you got a new forum. congrats

good start. all the best.
Back to top  
itslucky
Fun Addict
Fun Addict


Joined: 14 Jan 2009
Posts: 912
Gender: Male
Location: Heart of my Carbon Copy
PostPosted: Apr 24, 2009     Post subject: Reply with quote

Thanx!!! Very Happy
Back to top  
sunny
Initiator
Initiator
sunny's avatar

Joined: 28 Aug 2008
Posts: 1335
Gender: Male

PostPosted: Apr 24, 2009     Post subject: Reply with quote

Great work..! It will help the needy in this field.... Keep going..!!!
Back to top  
ar
Ultimate Contributor
Ultimate Contributor


Joined: 17 Feb 2007
Posts: 6708
Gender: Male
Location: Pakistan, Lahore
PostPosted: Apr 25, 2009     Post subject: Reply with quote

Thanks for Sharing
Back to top  
editorawais
Ultimate Contributor
Ultimate Contributor


Joined: 15 Nov 2008
Posts: 3687
Gender: Male
Location: Buzy!!!
PostPosted: Apr 25, 2009     Post subject: Reply with quote

gr8 work dude.thnx for sharing
Back to top  
itslucky
Fun Addict
Fun Addict


Joined: 14 Jan 2009
Posts: 912
Gender: Male
Location: Heart of my Carbon Copy
PostPosted: Apr 25, 2009     Post subject: Reply with quote

Thanku Thanku Very Happy
Back to top  
ujala
Ultimate Contributor
Ultimate Contributor


Joined: 31 Jan 2009
Posts: 7425
Gender: Female

PostPosted: Apr 26, 2009     Post subject: Reply with quote

now can i call u

SIR LUCK Smile



Thanks 4 great sharing
Back to top  
itslucky
Fun Addict
Fun Addict


Joined: 14 Jan 2009
Posts: 912
Gender: Male
Location: Heart of my Carbon Copy
PostPosted: Apr 26, 2009     Post subject: Reply with quote

Very Happy

But still when i look at ur POSTS, it seems that u r elder then me,
so just call me "Lucky" becoz "itsLucky" Smile

its my pleasure that u call me that...


u welcome...

and if u have any query then please post it...

i'll be glad to assist u..!!! Smile
Back to top  
Display posts from previous:   
Post new topic   Reply to topic    Home -> Science & Technology Zone -> Programming All times are GMT
Page 1 of 2
Quick Reply
Message body:

Add smilies
 

 
Jump to:  
Here You can
Download files

Top 5 Most Viewed Topics in Current Forum
How to Start Java Programming
OOP Object Oriented Programming... (CPP)
Inroduction to Java
C# Programming
Introduce urself (How much u know about programming)
5 Latest Topics in this Forum
History of PHP
C# Programming
Introduce urself (How much u know about programming)
How to Start Java Programming
OOP Object Oriented Programming... (CPP)

Top Favourite Posts

Celeb's Gosspics

Love & Dating

Sonal Chauhan Gets in Jannat