6 years ago in Java Classes And Methods

What is the output of this program?
class equality {

int x;

int y;

boolean isequal(){

return(x == y);



class Output {

public static void main(String args[])


equality obj = new equality();

obj.x = 5;

obj.y = 5;

System.out.println(obj.isequal); }


[A] false
[B] true
[C] 0
[D] 1
Next Question

Create your Digital Resume For FREE on your name's sub domain "yourname.wcard.io". Register Here!

Overall Stats

Attempted 219
Correct 99
Incorrect 24
Viewed 96


Komal Kota
Komal Kota - 1 month ago

Komal Kota is saying 0 is correct answer

DZ&UC N.Feroze
DZ&UC N.Feroze - 2 months ago

DZ&UC N.Feroze from Karachi, Pakistan is saying true is correct answer

Azeezat Omolara Azeez
Azeezat Omolara Azeez - 3 months ago

Azeezat Omolara Azeez from Suleja, Nigeria is saying true is correct answer

nancys selvam
nancys selvam - 4 months ago

nancys selvam is saying true is correct answer

Anyaogu Margaret
Anyaogu Margaret - 5 months ago

Anyaogu Margaret from Lagos, Nigeria is saying true is correct answer

Related Questions

Which of these method of Object class is used to obtain class of an object at run time?

  • [A] get()
  • [B] void getclass()
  • [C] Class getclass()
  • [D] None of the mentioned

Which of these class is super class of every class in Java?

  • [A] String class
  • [B] Object class
  • [C] Abstract class
  • [D] ArrayList class

Which of these keywords cannot be used for a class which has been declared final?

  • [A] abstract
  • [B] extends
  • [C] abstract and extends
  • [D] None of the mentioned