[TuT] - Making a Java Application

Java Discuss, [TuT] - Making a Java Application at Programmers Lounge forum; In this tutorial, I will be teaching you how to create your first Java application. First - Open notepad - ...


Go Back   Gamerz Needs - For All Your Gaming Needs! > Technology Zone > Programmers Lounge > Java
Forgot Password? | Sign Up!

Notices

Advertisement
   

Reply
 
Bookmark this Thread Tools Display Modes
  #1  
Old 11-11-2007, 12:55 PM
Aimless's Avatar
is better than you
 
Last Online: Yesterday 12:59 PM
Join Date: Oct 2007
Age: 19
Posts: 159
Thanks: 4
Thanked 23 Times in 15 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 3
Aimless is on a distinguished road
Points: 349.38
Bank: 784.87
Total Points: 1,134.25
[TuT] - Making a Java Application

In this tutorial, I will be teaching you how to create your first Java application.

First - Open notepad
- Once notepad is open you will want to type
public class Hey
This indicates that you are declaring a new class file called Hey

Remember the name, because this is important. You absolutely MUST save your file as Hey.java for it to compile correctly.

- (I'll be using the name "Hey" as my file name, you may use any name.)

Ok, now you should have:
public class Hey
{
}

If you don't have that, copy it into your notepad file, and you'll be ready to move on.
Next, we will want to create our first void.

What is a void?
A void is somewhat of a procedure. Every command inside of the void will be executed when the void is called on.

Ok. Now that you know what a void is, it's time to put it into our coding.
This is what it should look like:
public class Hey
{
public static void main(String args[])
{

}
}

If you don't have that, copy it into your notepad file, and you'll be ready to move on.
Now, we will want to insert our first command, System.out.println("Hey");
This stands for System.outPUT.Print with new line
This means that the System will Ouput Hey into a new line. So let's go ahead and add it in.
You will be finished when you have:
public class Hey
{
public static void main(String args[])
{
System.out.println("Hey this is my first application and I love GzN?");
}
}


Congratulations, you have now completed your first java application!
__________________
  #2  
Old 11-12-2007, 06:58 AM
Stone Axe
 
Last Online: Yesterday 10:14 AM
Join Date: Oct 2006
Location: Jerusalem the holy city
Posts: 42
Thanks: 9
Thanked 2 Times in 2 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
garbett1 is on a distinguished road
Points: 1,516.02
Bank: 684.64
Total Points: 2,200.66
Send a message via Skype™ to garbett1
well actually if you really want to use java download eclipse. it is much more user friendly has some tuts in it and has some good things such as getter and setter generators and auto correctors and completers. so if you are gonna use java i recommend using eclipse.
download for free at : Eclipse Downloads

Last edited by garbett1; 11-12-2007 at 07:02 AM.. Reason: wrong link
  #3  
Old 06-13-2008, 03:00 PM
Chick
 
Last Online: 07-01-2008 04:05 PM
Join Date: Jun 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
nugums is on a distinguished road
Points: 229.00
Bank: 0.00
Total Points: 229.00
thanks..this helps alot for a noob like me
  #4  
Old 06-14-2008, 10:19 PM
Ozakee's Avatar
True Desolation
 
Last Online: 10-26-2008 08:16 PM
Join Date: Oct 2005
Location: Tennessee
Age: 33
Posts: 1,578
Blog Entries: 1
Thanks: 110
Thanked 116 Times in 71 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog: Hmm Back agian
Rep Power: 12
Ozakee is on a distinguished road
Points: 50,463.06
Bank: 2,564.90
Total Points: 53,027.96
Send a message via AIM to Ozakee Send a message via MSN to Ozakee Send a message via Yahoo to Ozakee Send a message via Skype™ to Ozakee
Wow cool, I always wanted to learn to make applications and programs, thanks for the guide.
  #5  
Old 06-23-2008, 05:07 PM
1k Points Wasted
 
Last Online: Yesterday 01:40 PM
Join Date: Aug 2006
Location: over there
Posts: 2,207
Blog Entries: 6
Thanks: 48
Thanked 171 Times in 134 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog: Very random blog entries (based on time)
Rep Power: 13
cosmeo3000 will become famous soon enoughcosmeo3000 will become famous soon enough
Points: 5,777.56
Bank: 87,017.35
Total Points: 92,794.91
Black - cosmeo3000 
Send a message via MSN to cosmeo3000
Actually a void is what the block of code returns. When it's void, it returns nothing after it's finished, if it's int, it returns a number value, etc. This can be useful because if you have a function to for example do a math problem, you would use int because then it would be able to return an integer.
__________________

Dam my other one won't animate for some reason o_O
  #6  
Old 06-24-2008, 08:02 AM
kaswar's Avatar
All Hope is Gone!
 
Last Online: Yesterday 11:39 AM
Join Date: Nov 2006
Location: Location:
Posts: 2,058
Thanks: 230
Thanked 221 Times in 145 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 11
kaswar will become famous soon enough
Points: 986.10
Bank: 108,759.05
Total Points: 109,745.15
Here ya go. Don't get drunk! O.O - joriannn Marked as kashin's property. (One of the four Mighty Titans led by sir SpaceCake) - kashin Merry christmas and seriously i couldnt find any other gift - ItsmYarD Merry Christmas N Happy New Years!!! - BiGbAnG to karwas. Bang - stormer320 
gotcha RPKMHFTAGUITALABPC - ROVE ure not drunk enough yet - swordmas754 
Gold - Wizxon Green - swordmas754 Green - swordmas754 
Send a message via MSN to kaswar
Quote:
Originally Posted by cosmeo3000 View Post
Actually a void is what the block of code returns. When it's void, it returns nothing after it's finished, if it's int, it returns a number value, etc. This can be useful because if you have a function to for example do a math problem, you would use int because then it would be able to return an integer.
so int and others like that are called Functions
It returns a certain Value once it has been carried out


a void in other languages are called Procedures. Hope that clear up some confusion
__________________


Quote:
Originally Posted by Nuclear Bomb, The Legend, xDiamond, GzNPrize, iPromise, Aduka
I mastered vb in 1 month

Last edited by kaswar; 06-24-2008 at 08:04 AM..
  #7  
Old 06-24-2008, 09:58 AM
Stone Axe
 
Last Online: Yesterday 10:14 AM
Join Date: Oct 2006
Location: Jerusalem the holy city
Posts: 42
Thanks: 9
Thanked 2 Times in 2 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
Latest Blog:
Rep Power: 0
garbett1 is on a distinguished road
Points: 1,516.02
Bank: 684.64
Total Points: 2,200.66
Send a message via Skype™ to garbett1
something that should be added is that you can't do anything with this until you compile it into a class file then run using cmd or by using the eclipse program
Reply


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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Advertisement
   


Main Navigation
Home
GzN Forums
GzN Games
GzN News
Top Games
GzN Cheats
GzN Articles
GzN Reviews
GzN Downloads
User Control Panel
Advertising
RSS Feed
2Moons
Adventure Quest
AirRivals
America's Army
Anarchy Online
Archlord
Audition
Battlefield Series
Cabal Online
Call Of Duty Series
Combat Arms
Conquer Online
Counter Strike
Day of Defeat
Deicide Online
Diablo Series
Doom Series
Drift City
Enemy Territory
Eudemons Online
Final Fantasy
Flyff (Fly For Fun)
FreeStyle Street Basketball
General Game Discussion
Ghost Online
Granado Espada
Grand Theft Auto Series
Guild Wars
Gunbound
Gunz Online
Habbo Hotel
Half-Life 2
Hero Online
KartRider
Knights Online
Maple Story
Medal of Honor
MU Online
Neopets
Pangya
Quake Series
Ragnarok Online
Rappelz
Rakion
Red Orchestra
Rose Online
Runescape
Scions of Fate
Silkroad Online
Sims Series
Soldier Front
Starcraft
Tales of Pirates
Tibia
The Ship
Trickster Online
TS Online
Unreal Tournament
War Rock
WolfTeam
World of Warcraft & Series
Affiliates
COD4 Hacks
BF2 Hacks


All times are GMT -8. The time now is 03:09 PM.