java - Incompatible Type - Please help - BlueJ BouncingBall Demo -


I do not understand why I get an incompatible type within the embedded loop within the given loop. When I compile the bounceball = ball.gate (i), I am receiving an inconsistent type error; Anyone have any idea what I am doing wrong?

  import java.awt.Color; Import java.util.ArrayList; Import java.util.Random; Public Square BallDemo {Private Canvas myCanvas; Private Arrestist Ball; Private bouncingball bounceball; Private random random generator; Public ballmo () {myCanvas = new canvas ("ball demo", 600,500); } Public Zero Bounce () {int ground = 400; Ball = new arrivate (); RandomGenerator = new random (); MyCanvas.setVisible (true); MyCanvas.erase (); MyCanvas.drawLine (50, ground, 550, ground); Bouncingball ball 1 = new bouncingball (position (), position (), 16, color. BLUE, ground, MAC canvas); Ball1.draw (); Bouncingball ball 2 = new bouncingball (position (), position (), 20, color. RED, ground, MAC canvas); Ball2.draw (); Bouncingball ball 3 = new bouncingball (position (), position (), 20, color. Black, field, macaw); Ball3.draw (); Ball.add (ball1); Ball.add (ball2); Ball.add (ball3); Bullion ends = wrong; While (! Finished) {myCanvas.wait (50); For (int i = 0; i  = 550) {ends = true; }}}} Public integer status () {random randomener.nextInt (200); }}    

I think it needs it:

Private Array List & Lieutenant; Bouncingball & gt;

ball = new array list & lt; Bouncingball & gt; ();

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -