-
What is the output of this program?
class equal
{
int p;
int q;
boolean isequal()
{
return(p == q);
}
}
public class Result
{
public static void main(String args[])
{
equal obj = new equal();
obj.p = 7;
obj.q = 10;
System.out.println(obj.isequal());
}
}
-
- Compiletime error
- false
- Runtime error
- true
- None of these
Correct Option: B
Output: false