This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Confusing Question. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Confusing Question." Watch "Confusing Question." New topic

Confusing Question.

kundana sharma

Joined: Sep 09, 2012
Posts: 10
This question is confusing me a lot.
Can some one clarify this.please explain both the cases:enabling assertions and disabling assertions.

Greg Charles

Joined: Oct 01, 2001
Posts: 2853

I don't know what the question is exactly, but the "trick" seems to be using = instead of ==. That means true is assigned to assertEnabled, and true is the value of the expression. If you didn't pay close attention you might think assertEnabled would be compared to true, and false would be the value of the expression.
kundana sharma

Joined: Sep 09, 2012
Posts: 10
Thank you .
I understood this after I posted the question.
GeeCON Prague 2014
subject: Confusing Question.