Java help

Post » Thu May 19, 2011 4:00 am

My uncle has started a course on Java, and today he told me that he's finding it a bit difficult. He mentioned something about brackets and commas he's been using (I have no idea what this means), and if there's some kind of online help he could use to learn more about what he's doing. Specifically, what these brackets and commas mean, although general help would also be appreciated.

Anyone has a link to some kind of help file on Java? A java for dummies kind of thing?

Thank you.
User avatar
evelina c
 
Posts: 3377
Joined: Tue Dec 19, 2006 4:28 pm

Post » Thu May 19, 2011 10:43 am

http://www.thenewboston.com/?cat=36&pOpen=tutorial
User avatar
MR.BIGG
 
Posts: 3373
Joined: Sat Sep 08, 2007 7:51 am

Post » Thu May 19, 2011 4:39 am

I assume that you mean curly braces when you say brackets...

Curly braces enclose units of code. For example if you write:

class something {}


those curly braces mean that everything between them is a part of this class.


I'm also going to assume that you mean semicolons ( ; )

Semicolons mark the end of a java statement. For example:

double someNumber;


means that you're creating a variable called someNumber, and that it's of the type Double. You have nothing more to say about someNumber so you end the statement with a semicolon.


EDIT: if you actually meant brackets, then I can tell you that brackets are used with arrays. To be more specific they enclose the indexing expressions of an array. For example:

int[] someArray;someArray = new int[3];


the first line declares an (empty) array of integers, the second line initializes the array with 3 int values.
User avatar
George PUluse
 
Posts: 3486
Joined: Fri Sep 28, 2007 11:20 pm

Post » Thu May 19, 2011 6:06 am

Thanks guys.

I've emailed him the link and your explanation Exo, I hope that helps him. Cheers.
User avatar
Rachel Tyson
 
Posts: 3434
Joined: Sat Oct 07, 2006 4:42 pm


Return to Othor Games