0
Please what's the error in my code
https://code.sololearn.com/cll1z1G6g5uN/?ref=app https://code.sololearn.com/cll1z1G6g5uN/?ref=app
5 Respostas
+ 1
Missing a square bracket before public double area()
public rectangle (double length ,double breath ){
this.length = length;
this.length = breath;
//method
}
public double area(){
return length*breath;
}
}
+ 1
In the constructor, you assigned both <length> and <breath> argument into 'length' member. I think you meant to do this instead.
this.length = length;
this.breath = breath;
+ 1
And you need to have a main method in that rectangle class.
0
Thank you so much
0
🥺🥺