DEV Community

Pavitra Aravind
Pavitra Aravind

Posted on

Errors

ERROR 1:

Image description
teacher.teach()

Error Discribtion:

(;) => Removed that symbol comes to error for expected semicolon...

output:

Image description

ERROR 2:

Image description

Error Discribtion:

i am created Object string ("Amount") and method definition is int(no1) value so came that error

teacher.tour("Amount");

public void tour(int no1)
{
System.out.println(no1);
}

String cannot be converted to int teachers.tour("Amount");

Output:

Image description

Top comments (0)