| Author |
Assertion enabled and disabled Question?
|
RAGU KANNAN
Ranch Hand
Joined: Dec 16, 2005
Posts: 103
|
|
Hello Folks, For the following question the answer is �A�,�B� and �D�. I agree with the answer �B� and �D�. But I won�t agree with the answer �A� because the �A� is already disabled by assertion. Pls let me know, If am I missing anything. Thanks, Raghu.K Question: - The package favorite.fruits contains different classes for different fruits. Mango and Apple are in this package. Pineapple and Orange are in the package citrus, which is a sub package of favorite.fruits. Assume that all these classes are compiled with Assertions enable. Given the following command at the command prompt, which of the following classes would have assertions enabled? java -ea:favorite.fruits... -da:favorite.fruits.Apple favorite.fruits.Mango Answer:- A) favorite.fruits.Mango B) favorite.fruits.citrus.Pineapple C) favorite.fruits.Apple D) favorite.fruits.citrus.Orange E) net.util.FTPMan
|
 |
Naseem Khan
Ranch Hand
Joined: Apr 25, 2005
Posts: 809
|
|
java -ea:favorite.fruits... -da:favorite.fruits.Apple favorite.fruits.Mango Mango is the class which you are running . Disabled for Apple class only. Naseem
|
Asking Smart Questions FAQ - How To Put Your Code In Code Tags
|
 |
RAGU KANNAN
Ranch Hand
Joined: Dec 16, 2005
Posts: 103
|
|
Thanks Naseem, what is syntex,if i need to disable morethan one class. Thanks, Raghu.K
|
 |
Naseem Khan
Ranch Hand
Joined: Apr 25, 2005
Posts: 809
|
|
Then you have to write enable assertion in general for package favorite.fruits but disable for the listed classes Mango and Apple Naseem
|
 |
 |
|
|
subject: Assertion enabled and disabled Question?
|
|
|