Aptitude Questions
Aptitude Questions
Answer: d
Answer: b
Answer: b
a. 9 b. 10
c. 12 d. 20
Answer: b
5.A car travelling with of its actual speed covers 42 km in 1 hr 40
min 48 sec. Find the actual speed of the car.
a.100 km/hr b. 25 km/hr
c. 30 km/hr d.35 km/hr
Answer: d
Answer: c
Answer: e
Answer: b
Answer: a
11. The Kingston Mall has more stores than the Galleria.
The Four Corners Mall has fewer stores than the Galleria.
The Kingston Mall has more stores than the Four Corners Mall.
If the first two statements are true, the third statement is
a. true c. uncertain
b. false
Answer: a
12. Which of the following statements should be used to obtain a
remainder after dividing 3.14 by 2.1 ?
a. rem = 3.14 % 2.1; c. rem = fmod(3.14, 2.1);
b. rem = modf(3.14, 2.1);
d. Remainder cannot be obtain in floating point division.
Answer: c
15. How would you round off a value from 1.66 to 2.0?
a. ceil(1.66) b. floor(1.66)
c. roundup(1.66) d. roundto(1.66)
Answer: a
16. Which of the following type of class allows only one object of it
to be created?
a. Virtual class b. Abstract class
c. Singleton class d. Friend class
Answer: c
17. Which of the following is not a type of constructor?
a. Copy constructor b. Friend constructor
c. Default constructor d. Parameterized constructor
Answer: b
Answer: b
Answer: c
Answer: c
Answer: b
Answer: d
Answer: b
Answer: a
Answer: a
Answer: b
class HappyGarbage01
{
public static void main(String args[])
{
HappyGarbage01 h = new HappyGarbage01();
h.methodA(); /* Line 6 */
}
Object methodA()
{
Object obj1 = new Object();
Object [] obj2 = new Object[1];
obj2[0] = obj1;
obj1 = null;
return obj2[0];
}
}
27. Where will be the most chance of the garbage collector being
invoked?
a. After line 9 b. After line 10
c. After line 11
d. Garbage collector never invoked in methodA()
Answer: d
Answer: a
Answer: d
Answer: b
Answer: a
36. Which of the following is NOT a type of SQL constraint?
a) PRIMARY KEY
b) FOREIGN KEY
c) ALTERNATE KEY
d) UNIQUE
Answer: c
try
{
int x = 0;
int y = 5 / x;
}
catch (Exception e)
{
System.out.println("Exception");
}
catch (ArithmeticException ae)
{
System.out.println(" Arithmetic Exception");
}
System.out.println("finished");
a) finished
b) Exception
c) Compilation fails.
d) Arithmetic Exception
Answer: c
39.
Select the alternative which represents three out of the five
alternative figures which when fitted into each other would form a
complete square.
a) 145
b) 245
c) 123
d) 234
Answer: b
40. The banker's discount on a bill due 4 months hence at 15% is
Rs. 420. The true discount is:
a) Rs. 400
b) Rs. 360
c) Rs. 480
d) Rs. 320
Answer: a
Answer: b
Answer: c
Answer: c
Answer: a
53. What part is used to compile, debug and execute java programs?
a) JRE
b) JIT
c) JDK
d) JVM
Answer: c
54.
Which three form part of correct array declarations?
1. public int a [ ]
2. static int [ ] a
3. public [ ] int a
4. private int a [3]
5. private int [3] a [ ]
6. public final int [ ] a
a. 1, 3, 4
b. 2, 4, 5
c. 1, 2, 6
d. 2, 5, 6
Answer: c
55. public class Test { }
What is the prototype of the default constructor?
a. Test( )
b. Test(void)
c. public Test( )
d. public Test(void)
Answer: c
Answer: d
Answer: c
Answer: a
Answer: c
Answer: d