Given:
3. public class Sep26 {
4. public static void main(String[] args) {
5. short f4 = 4;
6. new Sep26().go(f4);
7. new Sep26().go(new Integer(8));
8. }
9. void go(Short s) { System.out.print("S "); }
10. void go(Long l) { System.out.print("L "); }
11. void go(int i) { System.out.print("i "); }
12. void go(Number n) { System.out.print("N "); }
13. }
What is the result?
A. i L
B. i N
C. S L
D. S N
E. Compilation fails.
F. An exception is thrown at runtime.
DOWNLOAD the answer
This is your world! It's not just Java
Leave a Message
Blog Archive
-
▼
2011
(40)
-
▼
September
(25)
- Quiz of the day | OCPJP (25)
- Quiz of the day | OCPJP (24)
- Quiz of the day | OCPJP (23)
- Quiz of the day | OCPJP (22)
- Quiz of the day | OCPJP (21)
- Quiz of the day | OCPJP (20)
- Quiz of the day | OCPJP (19)
- Quiz of the day | OCPJP (18)
- Quiz of the day | OCPJP (17)
- Quiz of the day | OCPJP (16)
- Quiz of the day | OCPJP (15)
- Quiz of the day | OCPJP (14)
- Quiz of the day | OCPJP (13)
- Quiz of the day | OCPJP (12)
- Quiz of the day | OCPJP (11)
- Quiz of the day | OCPJP (10)
- Quiz of the day | OCPJP (9)
- Quiz of the day | OCPJP (8)
- Quiz of the day | OCPJP (7)
- Quiz of the day | OCPJP (6)
- Quiz of the day | OCPJP (5)
- Quiz of the day | OCPJP (4)
- Quiz of the day | OCPJP (3)
- Quiz of the day | OCPJP (2)
- Quiz of the day | OCPJP (1)
-
▼
September
(25)
Labels
- About Java (2)
- Ajax (1)
- Animation (1)
- Array (1)
- BufferedReader (1)
- C# (1)
- C++ (1)
- Certification (5)
- Cryptography (1)
- Download (37)
- Eclipse (1)
- EJB (2)
- Game (3)
- Hibernate (3)
- Input Data (2)
- J2ME (1)
- Java 2D (1)
- Java 3D (1)
- Java Advance (1)
- Java Basic (6)
- Java Networking (1)
- Java RMI (1)
- Java Secrets (1)
- Java Swing (3)
- Java Thread (2)
- Java Tutorial (4)
- JavaFX (3)
- JDBC (1)
- JMS (1)
- JSP (1)
- Linux (1)
- MySQL (1)
- OCPJP (34)
- Opinion (2)
- Oracle (1)
- PHP (1)
- Scanner (1)
- SCJP (1)
- SCWCD (1)
- Silverlight (1)
- Spring (1)
- Tutorial (2)
- Web Service (1)
- Wireless (1)
Powered by Blogger.
0 comments:
Post a Comment