Correct Answer : Get Lastest Questions and Answer : Explanation: The while statement is incorrect. It has the syntax of a for statement. The while statement continually executes a block of statements while a particular condition is true. Its syntax can be expressed as: while (expression) { statement(s) } The while statement evaluates expression, which must return a boolean value. If the expression evaluates to true, the while statement executes the statement(s) in the while block. The while statement continues testing the expression and executing its block until the expression evaluates to false
Question : You have been given following
class Base { public static void main(String[] args) { System.out.println("Base " + args[2]); } }
public class Sub extends Base { public static void main(String[] args) { System.out.println("Overriden " + args[1]); } }