What does this do? public boolean isQuiet() {return this.quiet; }

What does this do?
public boolean isQuiet() {
            return this.quiet;
      }
yankeebushsoftwareAsked:
Who is Participating?
 
havman56Connect With a Mentor Commented:
this is the object that is calling

class Test have this function then

Test obj;
obj.isQuiet() is same way checking

return this.quiet;
is same way as
return quiet ;
0
 
JavatmCommented:
> What does this do?

in a very simple way it returns boolean but I can't say if it is true or false cause what you only have is:
this.quiet

if this.quiet is set to true somewhere or maybe false then you'll get the answer you can try:
System.out.println(this.quiet);
0
 
objectsCommented:
returns the value of the class member variable named quiet.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
>> in a very simple way it returns boolean

In a quiet way, it tells you if the current object is quiet or not :)
0
 
JavatmCommented:
> In a quiet way, it tells you if the current object is quiet or not :)

:D
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.