programming languages Online Quiz - 2
Description: programming languages Online Quiz - 2 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Method-Overloading implements the principle of Compile-time Polymorphism, wheras Method Over-riding implements the concept of Runtime Polymorphism.
JVM is the compiler for Java.
How many objects are created in the below code...????
String s="abc";
String s1=new String("def");
What is the concept Below???
class A {
int x=10;
};
class B extends A {
int x=100;
show() {
System.out.println(x);
}
public static void main(String... s) {
B b1=new B();
b1.show();
}
};
The program will print 100. But the concept illustrated is----
What is the output??(Easy One)
String s1="Java";
String s2="Java";
String s3=new String("Java");
String s4=new String("Java");
if(s1==s2) System.out.print("true");
else System.out.println("false");
if(s3==s4) System.out.print("true");
else System.out.println("false");
if(s1==s3) System.out.print("true");
else System.out.println("false");
if(s2==s3.intern()) System.out.print("true");
else System.out.println("false");
if(s3.intern()==s2.intern()) System.out.print("true");
else System.out.println("false");
Just try and get the Ouput---(Ignore any errors)
Variables are not interpolated inside which operator when used normally?
The regex /g.d?c*/
doesn't match
What is the outcome of the scenario on Unix platform: open(FH, ">c:\temp\notes.txt")
?
$a=[ { name=> "rose", kids=> [ qw( ted bobby john ) ] }, { name=> "marge", kids=> [ qw( maggie lisa bart ) } ]
What happens when @_ is modified?
%abc = %\$def
which option is correct when $def = \%any_hash
?
what is the output for printf ("%06.2f", \$amt) when \$amt = 9.355 ?
($t, @u, $v, @w ) = qw( India US Japan Spain Mexico China )
. How many elements are assigned to @u,@w?
Out of below four cases
- -5+5
- " "
- 0X0
- "0.00" + 0
- &complex_num();
- complex_num();
which is correct?
Can we use the constructor, instead of init(), to initialize servlet?
Which of the following should NOT be used to share data between servlets in a distributed web application?
Can we call destroy() method on servlets from service method ?
Which jsp implicit object is synchronized?
Can we implement an interface in JSP ?