Question 1
|
What will happen when you attempt to compile and run the following code? (Assume that the code is compiled and run with assertions enabled.) public class AssertTest {
public
void methodB() public
static void main(String args[]) |
|
| It will print -10 | |
| It will result in Assertion Error showing the message -"The value must not be negative". | |
| The code will not compile. | |
| None of these | |
Back to beginning | Next Question |
|
