Results 1 to 6 of 6
- 02-26-2010, 10:26 AM #1
need clarification in this statement.
I need some basic clarification with the following code. Please bare with me, I am still just a noob when it comes to all of this.
When using the follwing;
is the 'variable' actually an object. An object that inherites all avaible methods provided by its Class and/or Parent Class(es)?Java Code:variable.method() e.g. int numberOne = 0; numberOne.randomMethod();
In the instance of my example, numberOne is actually an instance of a int object?
-or-
Is an int actually a primitave data type. Which, correct me if I am wrong, isn't actually the same as an object?Last edited by Unsub; 02-26-2010 at 10:28 AM. Reason: seperated questions for easier reading.
- 02-26-2010, 10:43 AM #2
Go thru sun tutorial...
Ramya:cool:
- 02-26-2010, 10:44 AM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,381
- Blog Entries
- 7
- Rep Power
- 17
Yep, ints, doubles etc are the 'primitive' types of the Java language, all the others are the 'reference' types of the language. Primitives don't have methods nor members. Arrays are a bit strange: they are objects but don't have any methods nor can they be extended.
kind regards,
Jos
- 02-26-2010, 11:03 AM #4
a) Please, if your going to reply to my post, please try to be at least the slightest bit helpful. If you have a suggestion then pleases suggest it appropriately.
- Provide a link
- Read the post
- Dont assume that I haven't already done the tutorials.
...I was only asking for calrification to solidify my understanding. NOT direction.
- 02-26-2010, 11:04 AM #5
- 02-26-2010, 01:16 PM #6
Similar Threads
-
The if Statement, need some help!
By Keno777 in forum New To JavaReplies: 6Last Post: 10-24-2009, 12:53 AM -
HELP! need clarification
By ptsofathrty in forum New To JavaReplies: 1Last Post: 12-16-2008, 08:02 AM -
Private Classes Clarification
By justlearning in forum New To JavaReplies: 1Last Post: 05-06-2008, 10:51 PM -
Statement or Prepared Statement ?
By paty in forum JDBCReplies: 3Last Post: 08-01-2007, 04:45 PM -
If Statement
By aDrizzle in forum New To JavaReplies: 4Last Post: 07-08-2007, 08:55 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks