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: kodak_gallery_programmer !!kCq+A64Losi56ze 2012-01-25 19:46

>>30
tuna tunaObject // we are making a variable called tunaObject that is of type tuna

That's a reference variable you mental midget.


= new tuna(); // And assigning it to an object made by the tuna constructor function, which must be named tuna.

That's not a 'constructor function' you idiot. A function in Java, even one that is void, will always return something. In contrast a construct returns nothing. Not even void!

Why does this not make sense to you?

Far clearer, concise, and more correct explanations have already been given. Why you felt the need to give your own moronic and incorrect response goes beyond me.

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