+ 4
What's error in this program please help me
https://code.sololearn.com/ck8pr37LmkNu/?ref=app https://code.sololearn.com/ck8pr37LmkNu/?ref=app
2 Answers
+ 4
thanks bro it worked
+ 7
remove the semicolon after area() and declare it static.....
here's your modified code :-
class Student
{
static int l=10,b=20,area;
static void area()
{
area=l*b ;
System.out.println("area="+area);
}
public static void main(String args[])
{
System.out.println("l="+l);
area();
}
}



