[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
- ... |
| Notices | Welcome to the Gamerz Needs forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |  | 
11-11-2007, 12:55 PM
|  | 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 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!
__________________ | 
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 Points: 1,516.02 Bank: 684.64 Total Points: 2,200.66 | |
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
| 
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 Points: 229.00 Bank: 0.00 Total Points: 229.00 | | |
thanks..this helps alot for a noob like me
| 
06-14-2008, 10:19 PM
|  | True Desolation | | | Last Online: 10-26-2008 08:16 PM Join Date: Oct 2005 Location: Tennessee Age: 33
Posts: 1,578
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 Points: 50,463.06 Bank: 2,564.90 Total Points: 53,027.96 | | |
Wow cool, I always wanted to learn to make applications and programs, thanks for the guide.
| 
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
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 Points: 5,777.56 Bank: 87,017.35 Total Points: 92,794.91 | | |
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 | 
06-24-2008, 08:02 AM
|  | 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 Points: 986.10 Bank: 108,759.05 Total Points: 109,745.15 | | Quote:
Originally Posted by 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. | 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..
| 
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 Points: 1,516.02 Bank: 684.64 Total Points: 2,200.66 | | |
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
|  | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | |