Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Begining with Java


Begining with Java

By ghostghost | 4578 Reads |
0     0

Ok, so the first thing we need is a Java Compiler so i suggest going to google and type in JCreator (its what I use). Ok now its time to get coding! Java programs are written as classes, and all classes start with a class definition of the form: -public class name, the name must match the file for instance if we have a class name of HelloWorld then the file must be called HelloWorld.java. The class will comprise one piece of code, the main method. The main method must consist of "public static void main(String[] args)" but without the quotes. Now if we put this all together so far we can make a basic HelloWorld program. An example is below:

public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } And that is it, Pretty simple huh? We have the class name defined as HelloWorld, the main method which was the public static void main(String[] args), the { } which are used to determine the starts and stops of the block code you wish to enter, and the System.out.println("Hello World!"); which makes a window pop up one one line saying "Hello World!". This is just to get you started and see how easy Java can be to learn. I, myself have been doing it for about a week and im already making decently sized programs (mainly games though). After a while I will add more advanced concepts to help you proceed throughout your Java needs.

Thanks for reading sorry for spelling errors and such -Pyrodude0303

Comments
ghost's avatar
ghost 17 years ago

Yer, please can you add some more. That is only a hello world tutorial. Nice though, I used to be learning Java but I got tied up in C++. Bummer, lol

ghost's avatar
ghost 17 years ago

Will do, im in a class and this is just the first part of notes that i took. AFter we get further in it i will add more

ghost's avatar
ghost 17 years ago

Not many people use Java so mabey this willl get some people started. Nice article.

ghost's avatar
ghost 17 years ago

lol. you know what? this is nearly exactly the same as an article i posted on implosion. i know hello world is the starter programme for nearly any language.. but its nearly the same as mine. funny?? mine was more detailed though.

ghost's avatar
ghost 17 years ago

i just finished a java class in my school and i made sum kick ass applets and applications, all using a free program called textpad, its a great program, i use it for every programming language i use. Syntax highlighting and compliation for java. If any1 wants betetr tuts ill makae sum

ghost's avatar
ghost 17 years ago

shabuwcaw, i have only been on implosion once, and all i did was shout "w00t, im the only one here" and I got this from class actually, the notes i took…..so….ya

ghost's avatar
ghost 17 years ago

pretty awesome article :)

oh and btw those powerpoints help like a ton. thanks for them

ghost's avatar
ghost 17 years ago

cooly cool!

ghost's avatar
ghost 17 years ago

Very nice thinking about learning java now thanks.

SySTeM's avatar
SySTeM 17 years ago

Nice article man

bl4ckc4t's avatar
bl4ckc4t 17 years ago

nice. Java IS a pretty good language to learn. can help you with alot.

ghost's avatar
ghost 16 years ago

"textpad" nah, use eclipse (www.eclipse.org) its free, and the best out there for java