This site requires JavaScript, please enable it in your browser!
Greenfoot back
sashvanth
sashvanth wrote ...

2022/7/16

showing error in semicolon of stsement

sashvanth sashvanth

2022/7/16

#
code not Working.showing error as "expected ')' " import greenfoot.*; //(World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * */ public class Player extends Actor { /** * Act - do whatever the Player wants to do. This method is called whenever the 'Act' or 'Run' button gets pressed in the environment. * */ public Player() { setImage(new GreenfootImage( getImage().setColor(Color.RED); getImage().fillOval(0 , 0 , 50 , 50); } public void act() { } } in this both statements getImage().setColor(Color.RED); getImage().fillOval(0 , 0 , 50 , 50);
Roshan123 Roshan123

2022/7/16

#
setImage(new GreenfootImage(
is the cause of the error
sashvanth sashvanth

2022/7/17

#
ok
You need to login to post a reply.