A variable defined within a block is visible.
![]()
Practice Language Fundamentals –
A variable defined within a block is visible.
A variable defined within a block is visible.
![]()
Practice Language Fundamentals –
A variable defined within a block is visible.
Which statement is true?
![]()
Practice Garbage Collections –
Which statement is true?
Which of the following two entities (reading from Left to Right) ca
![]()
Practice Operators and Assignments –
Which of the following two entities (reading from Left to Right) can be connected by the dot operator?
In a HashTable Key cannot be null, but Value can be.
![]()
Practice hashCode() method –
In a HashTable Key cannot be null, but Value can be.
In which of the following collections is the Input/Output index-bas
![]()
Practice hashCode() method –
In which of the following collections is the Input/Output index-based?
How many enumerators will exist if four threads are simultaneously
![]()
Practice Threads –
How many enumerators will exist if four threads are simultaneously working on an ArrayList object?
![]()
Practice hashCode() method –
What is the output of the following program ?
class Modulus {
public static void main(String args[]) {
double a = 25.64;
int b = 25;
a = a % 10;
b = b % 10;
System.out.println(a + " " + b);
}
}Which of these keywords can be used to prevent Method ove
![]()
Practice Language Fundamentals –
Which of these keywords can be used to prevent Method overriding?
Which is a valid keyword in Java?
![]()
Practice Language Fundamentals –
Which is a valid keyword in Java?
In mathematics and computer programming, which one is the correct o
![]()
Practice Operators and Assignments –
In mathematics and computer programming, which one is the correct order of mathematical operators ?
Which will contain the body of the thread?
![]()
Practice Threads –
Which will contain the body of the thread?
What would be the output of the following program ?
![]()
Practice Command Line Arguments –
What would be the output of the following program ?
class test {
public static void main(String[] args) {
for(int i=0;i<=args.length;i++);
System.out.println(args[i]);
}
}
Which of these methods of Byte wrapper can be used to obtain Byte o
![]()
Practice Command Line Arguments –
Which of these methods of Byte wrapper can be used to obtain Byte object from a string?
![]()
Practice Inheritance –
What is the output of the following code ?
class A {
public int i;
protected int j;
}
class B extends A {
int j;
void display() {
super.j = 3;
System.out.println(i + " " + j);
}
}
class Output {
public static void main(String args[]) {
B obj = new B();
obj.i = 1;
obj.j = 2;
obj.display();
}
} ![]()
Practice Inheritance –
What is the output of the following program ?
class A {
int i;
void display() {
System.out.println(i);
}
}
class B extends A {
int j;
void display() {
System.out.println(j);
}
}
class inheritance_demo {
public static void main(String args[]){
B obj = new B();
obj.i=1;
obj.j=2;
obj.display();
}
}