Jump to content

teach me how to java

prolemur

I am 16 years old and I want to start learning java in the summer and will need some nooby projects to work on, has anyone taken java classes and would like to share what kind of work you were assigned?

 

For a career I would like to be a programmer, preferably a game developer and want to learn the ropes early on.

 

:) Thank you very much, 

 

Michael

Link to comment
Share on other sites

Link to post
Share on other sites

Well my suggestions for you can vary depending on how much you already know, or just how adventurous you are.  I will give you two ideas of my expierences learning to program.

 

My first experience was just looking at code, reading it trying to figure out what it did by looking at the results.  From there I modified and googled about things I didn't know about.  Eventually I learned the mechanics of programming (or at least well enough that learning them in school became childs play).  Here is a link to a good example to play around with: robocode.sourceforge.net

 

I would recommend downloading and running the code, then try modifying some of the tanks in the game...see what happens.  In terms of school this was actually used as a fun final project in the introduction to java.

 

If starting at the robocode is two much, this second experience might be better.  For classes the first code ever written is Hello World.  I would recommend figuring out how to do this.  From there, I would recommend finding a tutorial you like http://docs.oracle.com/javase/tutorial/ If you don't like this style of tutorial there are many floating around on the net, some with different approaches.  I would recommend going through the tutorials, and if you feel like you understand the basics go to my first experience.

0b10111010 10101101 11110000 00001101

Link to comment
Share on other sites

Link to post
Share on other sites

First off... welcome to the world of programming!!! 

 

the concept of programming is different but not at all scary. in fact, after you get the hang of it, great projects will spark (I'm in grade 12 and working on a massive tower defence game with a partner. aiming for 100%).  

 

programming is very logical. everything you want the computer to do must be though of in its basic form, and data is stored as variables, for instance  a person's age is stored as an integer, height, might be in a double (a decimal) his name is stored in a string. all you are doing in programming is accessing, modifying, and output variables.

 

the first thing you should do is to get a very learner friendly IDE (the thing where you type the code in). A good IDE will let you eaisily change, compile and execute your code. I recommend BlueJ. It even has colourful boxes to help you read nested code (you will learn that later)  

 

first thing you should do is copy this:

 

public class Hello World
{

public static void main(String[] args)

{

System.out.println("Hello World"); 
}
}

 

compile it, right click on the class in blueJ and click main(String [] args); Most of the code you don't have to understand until later, all that matters is the System.out.println(""); which outputs the code. 

 

Next notice this:

 

public class Hello World2

{

public class void main(String[] args)

{

String phrase = "Hello World";

System.out.println(phrase);
}
}

If you notice it would output the same thing. What you did was you created a variable (technically its not, but you don't need to worry about that as it behaves just like a variable) , you assigned it something and then you used the output command to ouput the variable. 

 

you can do this with the generic format:

 

Type name = value; 

 

so an integer:   int number = 5;

Characters:   char letter = 's';

Decimals:   double money = 4.23;

 

there's so much more to explain but there is java 101 (this is the first thing i've done in programming, and in two years, I am top 5 in my class, and going hoping to go to U of T in computer science). 

Link to comment
Share on other sites

Link to post
Share on other sites

I am 16 years old and I want to start learning java in the summer and will need some nooby projects to work on, has anyone taken java classes and would like to share what kind of work you were assigned?

 

For a career I would like to be a programmer, preferably a game developer and want to learn the ropes early on.

 

:) Thank you very much, 

 

Michael

If you are planing to do some online learning, hit me up. I'll join you, I'm also interested in learning Java. I know basic C, Python, and HTML/CSS. 

Link to comment
Share on other sites

Link to post
Share on other sites

Just start creating a simple game (super meat boy clone, zelda clone etc.) and search the internet for good tutorials (trust me there is more then enough)

 

What i did was just trying stuff out, and eventually you will learn how to code. Youtube videos are the best, just start by copying the guy in the video, and later on you will have learned to do basic function in a matter of hours :)

Best regards Zahlio,
Unity asset developer - Game developer (http://playsurvive.com) - Computer Science student

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×