Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java multiple classes

Name: Anonymous 2012-01-25 12:13

http://www.youtube.com/watch?v=XqTg2buXS5o&feature=player_profilepage#t=179s

     tuna tunaObject = new tuna();



Someone care to explain why you need to type "tuna" at the beginning and "tuna()" at the end if you already stated that you're going to use the tuna class at the beggining?
I think I understand the "tunaObject" is(the variable to which you will assign the new class in the main class, right?), but the "new" is still kind of ... I don't understand it either...
:/

Name: 27 2012-01-26 0:15

>>29
And my first reaction was "Oh geeze, this person is pulling that one out of their ass".
Technically, that blurb can be considered "pulled out of my ass" since the explanation doesn't actually apply to any language in particular, its just a generalization (and my knowledge in compiler construction is a bit rusty)... I did anticipate the usual derision so I've added the "plus other stuff" clause as the implementation details of object oriented languages are pretty diverse and what is and what isn't considered basic properties of object oriented isn't gospel. Reading it over again it could be argued that I've forgotten inheritance references (though, that could just be a magic "name" in an implementation), so for single inherited classes in particular there could be a cell in the class record to hold a reference to a super class symbol to cascade allocation.

Java is a very specific implementation of a flavor of ``object oriented'' and its structure is baked to the hard drive as class files which is readily described in chapter 4 of the JVM spec, however; I feel that it shows "more than needed" because it combines the job of a traditional executable blob with a class blueprint, with all the disadvantages that brings it.

How do you feel I should improve my description of a class?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List