File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Confusing Question." Watch "Confusing Question." New topic
Author

Confusing Question.

kundana sharma
Greenhorn

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
Sheriff

Joined: Oct 01, 2001
Posts: 2833
    
  11

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
Greenhorn

Joined: Sep 09, 2012
Posts: 10
Thank you .
I understood this after I posted the question.
 
 
subject: Confusing Question.
 
Similar Threads
Assertion statements and their compilation
Assertions
Assertion and class initialization
Assertion
Assertions Enabled? compilation vs runtime