in reply to Re: Tutorial: Introduction to Object-Oriented Programming
in thread Tutorial: Introduction to Object-Oriented Programming
Java has both primitives and object-versions for each of the primitives. I think that the Java designers knew that they would have a mutiny if they forced everyone to write:
Integer i = new Integer(3);
So they gave you a short-hand way (that doesn't give you the object functionality) which is:
int i = 3;
However, you can always promote your primitives to objects, and the primitives very limited (you can't even do string concatenation without using a StringBuffer object). Actually, to be more specific (since gjb rightly called me on this):
Anyway, my point was really that Java likes to see the entire world as objects, even the things that we Perl users normally see as primitives, and that to really start to actually do anything in Java you're going to have to get used to objects pretty quickly.
However, your point is well-taken and I'm going to be making some edits to my post to take in your (and others') feedback.