I was using booleans earlier in my class.
--> isProductRestricted
--> internal
--> isProductGlobal

I am using lombok too. So putting @Data at the top of class too. But, now I changed these boolean to Boolean variable.
I got errors where ever Object.isInternal() was used. I am not getting how isInternal() was working initially. There is no function in my class too.

Also, I am able to access boolean isProductGlobal using Object.getProductGlobal() bit there is "is" also attached to the productGlobal name. Can you please explain this? How is it happening here?

Thanks in advance.

Recommended Answers

All 4 Replies

You seem to be calling those methods as if they were class methods for the Object class... which they're not.

No. NOt object class. Consider it as like this:

MyClass myClass = new MyClass();


OK, it's just that you used Object in your first post

When you say "got errors", exactly what error messages do yu see?

Thanks for your quick response.
Yes. By errors, I meant that they are not defined any more. This happened when I changed boolean to Boolean. I suspect this happens because of lombok.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.