class Hell {
public static void main(String[] args) {
Integer i = 42;
String s = (i<40)?"life":(i>50)?"base":"ball";
System.out.println(s);
}
D is correct. This is a ternary nested in a ternary with a little unboxing thrown in.Both of the ternary expressions are false.
Which of the following statements about inheritance is false?
View Answer Report Error Discuss
Exception handling is targeted at
How many constructors can a class have?
A class can have any number of constructors. If a class have more than one constructor, we call it as the constructor is overloaded.
How to call a constructor in java?
Constructor chaining is the process of calling one constructor from another constructor with respect to current object.
Within same class: It can be done using this() keyword for constructors in same class
From base class: by using super() keyword to call constructor from the base class.
View answer Workspace Report Error Discuss
Which of the following is not a keyword?
"eval" is not a keyword and is can be used as variable.
Warning implicit declaration of function?
Function: A Function is a block of statement which perform some operation.
Declaring the function before using the function in program is known as implicit declaration of the function.
For Example::
Is it possible to nest functions in javascript?
Yes, it is possible to nest functions in javascript.
Which of the following attribute can hold the JavaScript version?
Language attribute contains the javascript versions.