Please help me find the syntax errors in the following: public class BB { privat
ID: 3611197 • Letter: P
Question
Please help me find the syntax errors in the following: public class BB{
private int one;
private int two;
public boolean equal()
{
return (one == two);
}
public print()
{
System.out.println(one +" " + two);
}
public BB(int a, int b)
{
> two = b;
}
}
Please help me find the syntax errors in the following: public class BB
{
private int one;
private int two;
public boolean equal()
{
return (one == two);
}
public print()
{
System.out.println(one +" " + two);
}
public BB(int a, int b)
{
> two = b;
}
}
Explanation / Answer
//Hope this will helpyou.public class BB
{
private int one;
private int two;
public boolean equal()
{
return (one == two);
}
public voidprint() //Function should have returntype
{
System.out.println(one +" " + two);
}
public BB(int a, int b)
{
> two = b;
}
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.