Searching for "I"

Q:

Which of the following statements are equal for a variable declared in the interface ?

1. int X=10
2. public int X=10
3. public static final int X=10

A) Only 1 and 2 are equal B) Only 2 and 3 are equal
C) All are unequal D) All are equal
 
Answer & Explanation Answer: D) All are equal

Explanation:

All the statements are equal because inside an interface a variable declared will be public static final by default 

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

Q:

Why interface method is always public?

Answer

To make this method available to every implementation class

Report Error

View answer Workspace Report Error Discuss

Subject: Java
Job Role: IT Trainer

Q:

Which of the following method declarations are allowed inside interface?

A) public void m1() B) private void m1()
C) protected void m1() D) abstract public void m1()
 
Answer & Explanation Answer: D) abstract public void m1()

Explanation:

Inside an interface every method will be by default abstract and public

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

Q:

X implements Y extends Z

A) X can be class Y,Z are interfaces B) X is an interface Y,Z are classes
C) X,Y are classes Z is an interface D) Complilation error
 
Answer & Explanation Answer: D) Complilation error

Explanation:

It is a compilation error it should be X extends Y implements Z

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

Q:

X implements Y, Z

Arguments:

1. X should be class
2. Y, Z should be interfaces

A) Only 1 is true B) Only 2 is true
C) Both 1 and 2 are true D) None
 
Answer & Explanation Answer: C) Both 1 and 2 are true

Explanation:

Both the statements are true 

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

Q:

Which of the following are valied?

A) A class can extend any number of classes simulteneously B) A class can implement only one interface at a time
C) A class can extend other class or can implement interface but not both simulteneously D) None of the above
 
Answer & Explanation Answer: D) None of the above

Explanation:

A is wrong because a class can extend nly one class .B is wrong because a class can implement any number of interfaces.C is wronb because both can can be done simulteneously.So, D is correct

Report Error

View Answer Report Error Discuss

Filed Under: Java
Job Role: IT Trainer

Q:

The banker's gain on a sum due 3 years hence at 12% per annum is Rs. 270. The banker's

discount is:

A) 1315 B) 1150
C) 1020 D) 980
 
Answer & Explanation Answer: C) 1020

Explanation:

T.D. =(B.G*100)/(R*T)=Rs(270*100)/(12*3) = Rs. 750.

B.D. = Rs.(750 + 270) = Rs. 1020.

Report Error

View Answer Report Error Discuss

Filed Under: Banker's Discount

Q:

The banker's discount on a certain sum due 2 years hence is11/10of the true discount.

The rate percent is:

A) 10% B) 7%
C) 8% D) 5%
 
Answer & Explanation Answer: D) 5%

Explanation:

Let T.D. be Re. 1.

Then, B.D. = Rs.11/10= Rs. 1.10.

Sum = Rs. (1.10*1)/(1.10-1) = Rs. (110/10)= Rs. 11.

S.I. on Rs. 11 for 2 years is Rs. 1.10

Rate = [(100 x 1.10)/(11 x 2 )]% = 5%.

Report Error

View Answer Report Error Discuss

Filed Under: Banker's Discount