Documente Academic
Documente Profesional
Documente Cultură
B. 3
C. 4
D. 5
Ans . B
2. Which collection class allows you to grow or shrink its size and provides indexed access to
its elements, but whose methods are not synchronized?
A. java.util.HashSet
B. java.util.LinkedHashSet
C. java.util.List
D. java.util.ArrayList
Ans : D
B. 2 and 3
C. 3 and 4
D. 2 and 4
Ans B
4.
B. 2, 3 and 4
C. 3, 4 and 5
D. 4, 5 and 6
Ans- A
5.
class Boo
{
Boo(String s) { }
Boo() { }
}
class Bar extends Boo
{
Bar() { }
Bar(String s) {super(s);}
void zoo()
{
// insert code here
}
}
which one create an anonymous inner class from within class Bar?
A. Boo f = new Boo(24) { };
A. finished
B. Exception
C. Compilation fails.
D. Arithmetic Exception
Ans . c
9. Which two of the following are legal declarations for nonnested classes and interfaces?
1. 1) final abstract class Test {}
2. 2) public static interface Test {}
3. 3) final public class Test {}
4. 4) protected abstract class Test {}
5. 5) protected interface Test {}
6. 6) abstract public class Test {}
A. 1 and 4
B. 2 and 5
C. 3 and 6
D. 4 and 6
Ans -c
10. Which of the following class level (nonlocal) variable declarations will not compile?
A. protected int a;
B. transient int b = 3;
D. volatile int d;
Ans C
11. When does method overloading is determined?
a) At run time
b) At compile time
c) At coding time
d) At execution time
Ans. B
12. Which concept of Java is achieved by combining methods and attribute into a class?
a) Encapsulation
b) Inheritance
c) Polymorphism
d) Abstraction
Ans . a
Read a,b
Function mul(a, b)
t=0
while (b != 0)
t=t+a
b=b-1
End While
return t;
End Function
a) 490563
b) 49056
c) 490561
d) None of the mentioned
Ans: Option B
{
…
ch = ‘b’;
while(ch >= ‘a’ && ch <= ‘z’)
ch++;
}
a) 0
b) 25
c) 26
d) 1
Ans: B
15. Consider the following piece of code. What will be the space required for this code?
a) 2n + 8
b) 2n + 4
c) 2n + 2
d) 2n
Ans: A
Numerical Ability Test
B. Saturday
C. Tuesday
D. Thursday
Ans – B
2. A motorboat, whose speed in 15 km/hr in still water goes 30 km downstream and comes back in
a total of 4 hours 30 minutes. The speed of the stream (in km/hr) is:
A. 4
B. 5
C. 6
D. 10
Ans B
3. A, B and C can do a piece of work in 20, 30 and 60 days respectively. In how many days can
A do the work if he is assisted by B and C on every third day?
A. 12 days
B. 15 days
C. 16 days
D. 18 days
Ans B
4. If a person walks at 14 km/hr instead of 10 km/hr, he would have walked 20 km more. The
actual distance travelled by him is:
A. 50 km
B. 56 km
C. 70 km
D. 80 km
Ans A
5.
6, 9, 15, 21, 24, 28, 30 … Find odd man out -
A. 28
B. 21
C. 24
D. 30
Ans A
6.
A 300 metre long train crosses a platform in 39 seconds while it crosses a signal pole in 18 seconds.
What is the length of the platform?
A. 320 m
B. 350 m
C. 650 m
D. Data inadequate
Ans. B
7. Statement: Should India encourage exports, when most things are insufficient for internal use
itself?
Arguments:
I. a) Yes. We have to earn foreign exchange to pay for our imports.
II. b) No. Even selective encouragement would lead to shortages.
A. Only argument I is strong
C. Either I or II is strong
1. What is the correct HTML element for the inserting a line break ?
a) <lb>
b) <break>
c) <br>
d) <break/>
Ans : C
2. What is the correct HTML for adding a background color ?
a) <background>yellow</background>
b) <body bg="yellow">
c) <body style="background-color:yellow;">
d) <body style="bg-color:red;">
Ans : C
3. What is the correct HTML for making a text area?
a) <textarea>
b) <input type=”textarea”>
c) <input type=”textbox”>
d) <textbox>
Ans: A
4. How do you make the text bold?
a) font:bold;
b) style:bold;
c) font-weight:bold;
d) Styles:bold
Ans: C
Ans: B