Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

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;
    }
}
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote