programming languages Online Quiz - 11
Description: programming languages Online Quiz - 11 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Attempted
0/20
Correct 0
Score 0
‹
›
Libname statements can be used to create excel workbooks
What is the memory of a class that contains niether data members nor member functions ?
How many differnces we can find between structures in C and C++ ?
We can initialize following type of variables in class declaration.
What will be the output of the program?
public class Foo {
Foo() {
System.out.print("foo");
}
class Bar {
Bar() {
System.out.print("bat");
}
public void go() {
System.out.print("hi");
}
} /* class Bar ends */
public static void main(String[] args) {
Foo f = new Foo();
f.makeBar();
}
void makeBar() {
(new Bar() {}).go();
}
} /* class Foo ends */
In which all cases does an exception gets generated. Select the two correct answers. int i = 0, j = 1;
What will be the output of the program?
public class WrapTest {
public static void main(String[] args) {
int result = 0;
short s = 42;
Long x = new Long("42");
Long y = new Long(42);
Short z = new Short("42");
Short x2 = new Short(s);
Integer y2 = new Integer("42");
Integer z2 = new Integer(42);
if (x == y) /* Line 13 */ result = 1;
if (x.equals(y)) /* Line 15 */ result = result + 10;
if (x.equals(z)) /* Line 17 */ result = result + 100;
if (x.equals(x2)) /* Line 19 */ result = result + 1000;
if (x.equals(z2)) /* Line 21 */ result = result + 10000;
System.out.println("result = " + result);
}
}
JAIN stands for Java Integrated Networks
JDO stands for Java Data Objects
JSSE stands for Java Socket Service Extension
JAX-WS stands for Java API for XML Web Services
JAX-RS stands for Java API for RESTful Web Services