In a PROC PRINT step,to control the order in which the variables appear you can use:
VAR statement
VARNUM Option
Variables Statement
all of the above
Overridden method is in child class and Overriding method is in parent class.
True
False
we cannot override a non-abstract method as abstract.
class P { public void doIt() {} } class C extends P { private void doIt() {}} It is not legal.
Java is a
Iterpreted Language
Compiled Language
Byte Code Language
None of these
The main method has to be "public static" because of the following reasons. (Two options)
static because it has to be constant and cannot be changed.
static because it has to be loaded by the JVM without instantiating it
public because other classes may also call the main method of a class
public because JVM has to have access to the main method in order to call it.
Which of the following are valid main method declarations?
static public void main(String []args)
public static void main(String heyhey[])
public static int main(String[] args)
public static void main(String ...args)
public static void main (String [], int argv)
Checked Exceptions are
all sub-classes of Throwable
not the sub classes of RuntimeException
all sub-classes of Error
int i=5; int a = + --i/2.0;
Does not compile saying binary operator has invalid use
2.0
2.5
exception will be thrown
Consider the following declarations ... float f = 4.5; //1 double d = 9.22; //2 short s = 3; //3 char c = s; //4 Which lines will throw error if any?
1 and 4
1
2 and 3
3 and 4
no error