Computer Applications
Related Questions
Write the following switch statement by using nested if statements:
switch (choice) { case 0: case 1: x = 111; y = 222; break; case 2: x = 333; y = 444; break; case 3: x = -11; y = -22; break; default: y = 555; }
Write an if statement to find the smallest of the three given integers using the min() method of the Math class.
Rewrite the following statement using if else:
int max=215, min=323; String str= (max>min) ? "Max is greater than Min" : "Min is Greater than Max";
Find the error, if any, in the following code. Write the correct statement.
int a=5, b=10; int x = (a>b)>true:false;