Professional Documents
Culture Documents
A. Heap memory
B. Stack memory
C. Both A and B
D. None of these
A. 1
B. No output
C. 8
D. 1357911
boolean b=false;
b = !b;
System.out.println(b);
A) true
B) false
C) Compiler error
int a = 12345;
B)
int a = 12_3__5;
C)
long a = 987____654_3__21L;
8. What is the output of the code snippet with the ternary operator?
int p=5;
System.out.print("Hello ");
(p<6)?5:6;
A) Hello 5
B) Hello 6
C) Hello
D) Compiler error
9. What is the output of the Java code snippet with Ternary operator?
System.out.println("Marks=" + marks);
A) marks=0
B) marks=10
C) marks=20
D) Compiler error
void TestingConstructor()
System.out.println("Amsterdam");
TestingConstructor()
System.out.println("Antarctica");
}
}
A) Antarctica
B) Amsterdam
C) No output
D) Compiler error
int a=1;
while(a<4)
a++;
A) 1 2 3 4
B) 1 2 3
C) 6
D) Compiler error
12. What is the output of the below Java program with WHILE, BREAK
and CONTINUE?
int cnt=0;
while(true)
{
if(cnt > 4)
break;
if(cnt==0)
cnt++;
continue;
System.out.print(cnt + ",");
cnt++;
A) 0,1,2,3,4,
B) 1,2,3,4,
C) 1,2,3,4
D) Compiler error
13. What is the output of the below java program that implements
nesting of loops?
while(i<3)
{
do
System.out.print(j + ",");
j++;
}while(j<4);
i++;
A) 1,2,3,4,1,2,3,4,
B) 1,2,3,4,
C) 1,2,3,1,2,3,
D) 1,2,3,
14. What is the output of the Java program with Enhanced FOR loop
below?
int i=0;
if(i<2)
else
break;
System.out.print(str + ",");
i++;
A) BRAZIL,CHILE,SYDNEY,
B) BRAZIL,CHILE,
C) BRAZIL,
D) Compiler error
15. What is the output of the below java program with Constructors
and Inheritance?
class Processor
Processor()
I3Processor()
{
I5Processor()
}
A) Inside I5Processor() Constructor. Inside I3Processor() Constructor.
Inside Processor() Constructor.
D) Compiler error
A.50 Meter
B.100 Meter
C.110 Meter
A) 7.5 kmph
B) 9.5 kmph
C) 5.5 kmph
D) 3.5 kmph
E) 4.5 kmph
18. A boy is walking at a speed of 10 km/h along a railway track. If he
is 800 m ahead of the train which is 400 m long and runs at a speed of
160 km/h in the same direction, then what is the time required to
pass a boy?
A) 15.2 sec
B) 18.3 sec
C) 12.5 sec
D) 28.8 sec
E) 8.6 sec
19. The length of train A is 25% more than that of train B and the
speed of train A is 20% more than that of B. If train A crosses a tree in
12 seconds and also crosses train B running in the same direction in
162 seconds, then find the speed of train B.
A) 100 kmph
B) 60 kmph
C) 90 kmph
D) 50 kmph
E) Cannot be determined
20. Rs, 2400 was invested for 3 years, partly in scheme A at the rate
15% S.I per annum and partly at the rate of 10% S.I per annum. Total
interest received at the end was Rs.930. How much sum of money
was invested in scheme A?
A. Rs.1500
B. Rs.1000
C. Rs.1200
D. Rs.1400
E. Rs.1900
A. Rs. 4,965
B. Rs. 5,500
C. Rs. 4,700
D. Rs. 4,265
E. Rs. 5,865
22. If the sum of two numbers is 42 and their product is 437, then find
the absolute difference between the numbers.
A. 4
B. 6
C. 8
D. 12
E. None
A. 553681
B. 555181
C. 555681
D. 556581
E. None
24. A sum of money lent at compound interest for 2 years at 20% per
annum would fetch Rs.96.4 more, if the interest was payable half
yearly, then find the sum?
A. Rs. 2,000
B. Rs. 2,500
C. Rs. 3,750
D. Rs. 4,250
E. Rs 4,000
A. Rs.8000
B. Rs.9000
C. Rs.7500
D. Rs.10000
E. Rs.15000
A. 4296 RS.
B. 3296 RS.
C. 3290 RS.
D. 6396 RS.
E. 2396 RS.
27. The sum of the speed of boat and stream in downstream and
upstream is 56km/h and the time taken by boat in upstream is 45min
whereas in downstream is 30min. find the difference between the
distance travelled in upstream and downstream if the speed of stream
is 4km/hr.
a) 5km
b) 2km
c) 6km
d) 7km
e) 8km
28. men and 5 women together can complete the work in 5 days and 4
men and 4 women can complete the work in 8 days. In how many
days 2 men and 2 women can complete the work?
A. 18 days
B. 8 days
C. 12 days
D. 16 days
E. 17 days
29. Arun alone can do a piece of work in 15 days. Rahul can do the
same piece of work in 12 days. Arun and Rahul are assigned to do the
work for Rs. 1250. They complete the work in 6 days with the help of
Ranjan. How much is to be paid to Ranjan?
A. Rs. 150
B. Rs. 125
C. Rs. 175
D. Rs. 225
E. Rs. 275
A. 35 cm
B. 120 cm
C. 140 cm
D. 84 cm
E. 70 cm