Java Reference
In-Depth Information
public AA()
{
x = 0;
y = 0;
}
public int AA( int a, int b)
{
x = a;
y = b;
}
}
Find the syntax errors in the definition of the following class:
public class BB
{
4.
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)
{
one = a;
two = b;
}
}
5. Consider the definition of the following class:
class CC
{
private int u;
private int v;
private double w;
public CC()
//Line 1
{
}
public CC( int a)
//Line 2
{
}
Search WWH ::




Custom Search