17 May, 2008, 09:16:23 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: We Return!
Home
FORUM
Help
Search
Calendar
Login
Register
The Coding Zone
>
The Coding Zone
>
Other Languages
>
Java
>
Java Tutorials
>
Simple Java Tut (1)
Pages: [
1
]
2
Go Down
« previous
next »
Print
Author
Topic: Simple Java Tut (1) (Read 7719 times)
0 Members and 2 Guests are viewing this topic.
Chicks are supposed to be hot, not earth.
Games don't make people violent, lag does
Bronze Contribution
Hero Member
Karma: 2
Offline
Gender:
Posts: 865
7908.36 Secksi Coins
View Inventory
Send Money to Bob_75
Simple Java Tut (1)
«
on:
14 January, 2007, 11:33:03 PM »
Java is a programming language that is growing rapidly. It is basically based on C/C++. If you know C, java will be a breeze for you, literally. Java is like a second gereration of C/C++.
First of all, we need a program that can compile Java programs that you write. I suggest getting JCreator. It is a free program that you can download from the JCreator website. Go to
http://www.jcreator.com/download
and download the JCreator Classic version (3rd program on the list), Java api documentation (last program on the list), and (if you don't already have the development kit) download the Java development kit. (for help on exactly how to download all these stuff, go to
http://thecodingzone.com/index.php/topic,4203.0.html
Hopefully I don't have to tell you how to run the .exe file that you downloaded
I suggest making a new folder somewhere in yor My Documents and keeping all your files and programs there.
Simple java program
Code:
/* Simple Java program
Author Bob_75
Date created - Jan. 14, 2007
*/
// defining a class
public class FunnyThings
{
public static void main (String[] args)
{
// display
System.out.println(" Some things that Bob thinks are funny");
System.out.println(" Clowns, Drug-adicts, Slaytanist");
}
}
Those curly braces are necessary. If you forget to close the braces, it will give you an error message. If you misplace them, it will give you an error message as well.
So, if you compile the code above, a dos screen will pop up and give you...
Code:
Some things that Bob thinks are funny
Clowns, Drug-adicts, Slaytanist
Press any key to continue....
If you already couldn't tell, Java and JavaScript are very alike. Basically JavaScript is a programming language that was
derived
from Java. Java is a stand-alone programming language, but JavaScript isn't. (Yeah, like you already didn't know that
)
That's all for today guys. I'll try to post some more tutorials later.
~ Peace
Logged
This resource was found useful by
4
out of
4
members. Rate it:
[applaud]
[smite]
More metal than thee...
Low-Tech Code Monkey
Administrator
Silver Contribution
Conqueror
Karma: 72
Offline
Gender:
Posts: 3687
294841.93 Secksi Coins
View Inventory
Send Money to Slaytanist
Re: Simple Java Tut (1)
«
Reply #1 on:
14 January, 2007, 11:41:08 PM »
It's as nice as a day can be... won't you come to the hanging with me?
Quote
Java is like a second gereration of C/C++.
Not at all. They're for completely different things.
Nice tutorial though : )
Logged
My standard sig is rated
15
.
theworldneedsmore.com/puterphobia
I love you, Emz!
Chicks are supposed to be hot, not earth.
Games don't make people violent, lag does
Bronze Contribution
Hero Member
Karma: 2
Offline
Gender:
Posts: 865
7908.36 Secksi Coins
View Inventory
Send Money to Bob_75
Re: Simple Java Tut (1)
«
Reply #2 on:
14 January, 2007, 11:42:22 PM »
not really, they are very....veryy.....VERY....similar. peps at sun microsystems basically took C and made it better lol, dat is wat my teacher told me
ty btw
Logged
More metal than thee...
Low-Tech Code Monkey
Administrator
Silver Contribution
Conqueror
Karma: 72
Offline
Gender:
Posts: 3687
294841.93 Secksi Coins
View Inventory
Send Money to Slaytanist
Re: Simple Java Tut (1)
«
Reply #3 on:
15 January, 2007, 12:37:39 AM »
Pierced from below, souls of my treacherous past... betrayed by many now ornaments dripping above!
Your teacher is wrong : )
No probs though, it's a good tutorial.
Logged
My standard sig is rated
15
.
theworldneedsmore.com/puterphobia
I love you, Emz!
CodeMaster
Coding Team
Silver Contribution
Legendary Member
Karma: 19
Offline
Posts: 1223
57168.48 Secksi Coins
View Inventory
Send Money to CodeMaster
Re: Simple Java Tut (1)
«
Reply #4 on:
15 January, 2007, 05:07:13 AM »
Quote from: Slaytanist on 15 January, 2007, 12:37:39 AM
Your teacher is wrong : )
No probs though, it's a good tutorial.
Haha, slay is basically married to C
Does JCreator come with the JDK [java development kit]?
And you should write a tutorial for writing java applets, since it seems to be what it's best known for.
Logged
pr0nslave
Bye.
I am no longer a part of this community.
Gold Contribution
Elite Member
Karma: 8
Offline
Gender:
Posts: 193
729860.80 Secksi Coins
View Inventory
Send Money to pr0nslave
Re: Simple Java Tut (1)
«
Reply #5 on:
17 January, 2007, 04:44:56 AM »
Quote from: CodeMaster on 15 January, 2007, 05:07:13 AM
Quote from: Slaytanist on 15 January, 2007, 12:37:39 AM
Your teacher is wrong : )
No probs though, it's a good tutorial.
Haha, slay is basically married to C
To say the least...
Anyhow, nice tutorial -- but, add more ;p I was getting back into the mood, "OOP" isn't that bad I guess... and then it ended.
Logged
Do not PM me or anything. I am NOT a part of this community.
CodeMaster
Coding Team
Silver Contribution
Legendary Member
Karma: 19
Offline
Posts: 1223
57168.48 Secksi Coins
View Inventory
Send Money to CodeMaster
Re: Simple Java Tut (1)
«
Reply #6 on:
18 January, 2007, 05:20:17 AM »
Quote from: Klark Kent on 17 January, 2007, 04:44:56 AM
Quote from: CodeMaster on 15 January, 2007, 05:07:13 AM
Quote from: Slaytanist on 15 January, 2007, 12:37:39 AM
Your teacher is wrong : )
No probs though, it's a good tutorial.
Haha, slay is basically married to C
To say the least...
Anyhow, nice tutorial -- but, add more ;p I was getting back into the mood, "OOP" isn't that bad I guess... and then it ended.
IMO, OOP is a mood. I have to get a feel for OOP again every time I decide to use it.
Logged
Chicks are supposed to be hot, not earth.
Games don't make people violent, lag does
Bronze Contribution
Hero Member
Karma: 2
Offline
Gender:
Posts: 865
7908.36 Secksi Coins
View Inventory
Send Money to Bob_75
Re: Simple Java Tut (1)
«
Reply #7 on:
20 January, 2007, 05:55:14 PM »
Quote from: CodeMaster on 15 January, 2007, 05:07:13 AM
Does JCreator come with the JDK [java development kit]?
And you should write a tutorial for writing java applets, since it seems to be what it's best known for.
no it doesn't, u have to download the jdk fromt the sun's website
and for the applet, lets learn the basic stuff first. good applets usually need more than one class defined and the "formating" is kinda wacky, u know...
Quote from: CodeMaster on 18 January, 2007, 05:20:17 AM
Quote from: Klark Kent on 17 January, 2007, 04:44:56 AM
Quote from: CodeMaster on 15 January, 2007, 05:07:13 AM
Quote from: Slaytanist on 15 January, 2007, 12:37:39 AM
Your teacher is wrong : )
No probs though, it's a good tutorial.
Haha, slay is basically married to C
To say the least...
Anyhow, nice tutorial -- but, add more ;p I was getting back into the mood, "OOP" isn't that bad I guess... and then it ended.
IMO, OOP is a mood. I have to get a feel for OOP again every time I decide to use it.
AMEN to dat C + Slaytanist = <3 thing.
i didn't write dat much cuz i didn't know peps here were interested in java. i am really happy to see all the feedbaks lol.
Logged
UnwantedSuperHero
:/
<[(ˈ?ɹ:ə)]>
Ex-Staff
Gold Contribution
Addict
Karma: 3
Offline
Gender:
Posts: 349
3273.76 Secksi Coins
View Inventory
Send Money to UnwantedSuperHero
Re: Simple Java Tut (1)
«
Reply #8 on:
22 January, 2007, 02:13:06 AM »
If Java is anything like Javascript, then i would try to learn it...
Also, i've heard you can code Core JavaScript aslong as you import something called java.script :p That true?
Logged
URGENT:
Having some trouble with FireFox or FireFox 2? Well, there's a brand new upgrade out that'll fix everything and more!
Click Here To Download!
//warning - above statement is bullshit
Chicks are supposed to be hot, not earth.
Games don't make people violent, lag does
Bronze Contribution
Hero Member
Karma: 2
Offline
Gender:
Posts: 865
7908.36 Secksi Coins
View Inventory
Send Money to Bob_75
Re: Simple Java Tut (1)
«
Reply #9 on:
23 January, 2007, 11:20:00 PM »
i don't know about the core javascript thingy, but java and js are very similar. as i said b4, java is a stand alone programming language, but javascript isn't. Java and JS are very similar. if u know java, or javascript, learning the other wud be easier. so, u can look into it, u'll understand a lot. i know some java and i can basically look at a js code and folo along.
Logged
"A programmer who shys away from elegant tricks will never be more than competent at best. Ego and a desire to attempt the impossible are traits of most great coders." - Slaytanist
"Music is love in search of a word" - S. Gabrielle
Code Tutor
Platinum Contribution
Hero Member
Karma: 23
Offline
Gender:
Posts: 864
613901.20 Secksi Coins
View Inventory
Send Money to Eureka
Re: Simple Java Tut (1)
«
Reply #10 on:
20 February, 2007, 03:51:54 AM »
Quote from: bob_75 on 14 January, 2007, 11:33:03 PM
/* Simple Java program
Author Bob_75
Date created - Jan. 14, 2007
*/
// defining a class
public class FunnyThings
{
public static void main (string args [ ] )
{
// display
System.out.println(" Some things that Bob thinks are funny");
System.out.println(" Clowns, Drug-adicts, Slaytanist");
}
}
Isn't it - public static void main (String[] args)?
String should be caps and that's the array.
Logged
Eureka's Signature Area:
(Updated 01.24.2008)
Normally, I would have something as my signature, but I'm uninspired today.
Eureka's Quotes Area:
(Updated 12.19.2007)
Quote from: Slaytanist (a British codemonkey who hates structured programming)
"A programmer who shys away from elegant tricks will never be more than competent at best. Ego and a desire to attempt the impossible are traits of most great coders."
"The only way to be sure of the absence of bugs is to have an understanding of the project at the lowest levels. If you know all the rules the game is not hard."
"APL is a tool, not a language."
"Programs are fundamentally pieces of exectutable code; abstracting this notion is counterproductive. It can make a useless programmer useful but will not make an average programmer exceptional, hence the explosion in high-level programming is inherently due to economics and not innovation."
Chicks are supposed to be hot, not earth.
Games don't make people violent, lag does
Bronze Contribution
Hero Member
Karma: 2
Offline
Gender:
Posts: 865
7908.36 Secksi Coins
View Inventory
Send Money to Bob_75
Re: Simple Java Tut (1)
«
Reply #11 on:
28 February, 2007, 05:54:38 AM »
oh ty ken. string sud be String, but i don't think it matters if u pud String[] args or String args []. not sure. i'll double check and
fix it.
fixed, and u were rite.
Logged
"A programmer who shys away from elegant tricks will never be more than competent at best. Ego and a desire to attempt the impossible are traits of most great coders." - Slaytanist
"Music is love in search of a word" - S. Gabrielle
Code Tutor
Platinum Contribution
Hero Member
Karma: 23
Offline
Gender:
Posts: 864
613901.20 Secksi Coins
View Inventory
Send Money to Eureka
Re: Simple Java Tut (1)
«
Reply #12 on:
01 March, 2007, 01:37:17 AM »
Quote from: bob_75 on 28 February, 2007, 05:54:38 AM
oh ty ken. string sud be String, but i don't think it matters if u pud String[] args or String args []. not sure. i'll double check and
fix it.
fixed, and u were rite.
I know I'm right because my teacher made the same mistake and I corrected him.
BTW, you didn't capitalize String.
Logged
Eureka's Signature Area:
(Updated 01.24.2008)
Normally, I would have something as my signature, but I'm uninspired today.
Eureka's Quotes Area:
(Updated 12.19.2007)
Quote from: Slaytanist (a British codemonkey who hates structured programming)
"A programmer who shys away from elegant tricks will never be more than competent at best. Ego and a desire to attempt the impossible are traits of most great coders."
"The only way to be sure of the absence of bugs is to have an understanding of the project at the lowest levels. If you know all the rules the game is not hard."
"APL is a tool, not a language."
"Programs are fundamentally pieces of exectutable code; abstracting this notion is counterproductive. It can make a useless programmer useful but will not make an average programmer exceptional, hence the explosion in high-level programming is inherently due to economics and not innovation."
Chicks are supposed to be hot, not earth.
Games don't make people violent, lag does
Bronze Contribution
Hero Member
Karma: 2
Offline
Gender:
Posts: 865
7908.36 Secksi Coins
View Inventory
Send Money to Bob_75
Re: Simple Java Tut (1)
«
Reply #13 on:
01 March, 2007, 05:13:00 AM »
grrr....ty again, this dam book i have is messing my whole brain up. i am reading it everywhere lol, cuz i have a pdf format and in my usb drive, learning to program java for dummies. it is a gr8 book.
Logged
"A programmer who shys away from elegant tricks will never be more than competent at best. Ego and a desire to attempt the impossible are traits of most great coders." - Slaytanist
"Music is love in search of a word" - S. Gabrielle
Code Tutor
Platinum Contribution
Hero Member
Karma: 23
Offline
Gender:
Posts: 864
613901.20 Secksi Coins
View Inventory
Send Money to Eureka
Re: Simple Java Tut (1)
«
Reply #14 on:
04 March, 2007, 08:24:28 AM »
Actually, I've been thinking about this topic quite a bit and I think I'll write a tutorial on this explaining the setup of JCreator a little more in-depth because other than that, I don't really see this as a helpful tutorial.
Logged
Eureka's Signature Area:
(Updated 01.24.2008)
Normally, I would have something as my signature, but I'm uninspired today.
Eureka's Quotes Area:
(Updated 12.19.2007)
Quote from: Slaytanist (a British codemonkey who hates structured programming)
"A programmer who shys away from elegant tricks will never be more than competent at best. Ego and a desire to attempt the impossible are traits of most great coders."
"The only way to be sure of the absence of bugs is to have an understanding of the project at the lowest levels. If you know all the rules the game is not hard."
"APL is a tool, not a language."
"Programs are fundamentally pieces of exectutable code; abstracting this notion is counterproductive. It can make a useless programmer useful but will not make an average programmer exceptional, hence the explosion in high-level programming is inherently due to economics and not innovation."
Pages: [
1
]
2
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
The Coding Zone Official
-----------------------------
=> TCZ Announcements & Updates
===> TCZ Archives
===> Magazine
=> TheCodingZone Discussion & Feedback
=> Introductions & Goodbyes
-----------------------------
The Coding Zone
-----------------------------
=> Programming & Coding Chat
===> Coding Projects
===> Code Battles
=> Web Based Coding
===> Javascript
=====> Javascript Tutorials
=====> Open Source
===> CSS
=====> CSS Tutorials
=====> Open Source
===> (X)HTML
=====> HTML Tutorials
=====> Open Source
===> Php / MySQL
=====> PHP Tutorials
=====> Open Source
=> Other Languages
===> C / C++
=====> C/C++ Tutorials
=====> Open Source
===> Python
=====> Python Tutorials
=====> Open Source
===> Visual Basic
=====> VB Tutorials
=====> Open Source
===> Java
=====> Java Tutorials
=====> Open Source
===> Tutorials
===> Open Source
-----------------------------
Forum & OS Resources
-----------------------------
=> Invisionfree
===> Custom Skins
=====> [WOW]Skins
=====> Light Skins
=====> Dark Skins
=====> Themed Skins
===> Code Requests
=====> Completed code requests
=====> Trashed requests
=====> To Do
===> Invisionfree Support
===> IF Tutorials
===> Custom Codes
=> Zetaboards
===> Zetaboards Codes
===> Zetaboards Code Requests
=====> Completed/Trashed Zeta Code Requests
=> SMF For Free
===> Custom Codes
===> Code Requests
=> Other Systems
===> SpreeBB
===> Invision Power Board
===> SMF
===> vBulletin
===> Nevux Ability Boards
=> Operating System(OS) Discussion
===> Mac
=====> Tutorials
===> Linux
=====> Tutorials
===> Windows
=====> Tutorials
-----------------------------
The Community Lounge
-----------------------------
=> The Coding Zone Services
===> TCZ Affiliates Catalog
=====> Accepted Affiliates
=====> Trashed Affiliate Requests
===> Advertisement Sector
=> Graphics Display/Chat
===> GFX Requests
=====> Completed Requests
=====> Trashed Requests
===> GFX Resources
=> Community chat
===> Forum games
===> The Hub
=> Entertainment
===> Gaming
===> Music
===> Cinema
-----------------------------
Staff
-----------------------------
===> Board Reviews
=====> Completed reviews
=====> Trashed Reviews
=====> First Person Shooters
=====> Coding Games
===> GFX Battles
=====> Completed Battles
=====> Trashed Battles
===> SOTW
=====> Completed SOTW