Ask your own question, for FREE!
Computer Science 10 Online
OpenStudy (anonymous):

Hi. I am creating a game and am new to it. How do I create collision and put in arrays of an object in netbeans?

OpenStudy (konradzuse):

Collision detection is done using "intersects." For example Rectangle.intersects(line);

OpenStudy (konradzuse):

Array of objects is liek any otehr array. Object[] o = new Object[10]; Rectangle[] r = new Rectangle[10];

OpenStudy (anonymous):

ok. But what is the [10] mean and after Rectangle[] is the r there because it is what rectangle starts with? @KonradZuse

OpenStudy (konradzuse):

it seems like you need to learn more about the language itself.. I'm assuming you're using Java With Netbeans? [10] is an array of 10. r is the name of the object... That's basic.

OpenStudy (anonymous):

Yes I am pretty new to the language. I just started a couple months ago. Im doing this for a project at school. And yes I am using Java with Netbeans

OpenStudy (konradzuse):

You can say Rectangle Tuna_Fish_sammich = new Rectangle(); if you wanted...

OpenStudy (anonymous):

you can get help from video tutorials on http://thenewboston.org/

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!