2. public class P {
3. private int p = 1;
4. public static void main(String[] args) {
5. protected int p = 3;
6. new P().new Q().q();
7. }
8. class Q {
9. void q() { System.out.println("number " + p); }
10. }
11. }
Which are true? (Choose all that apply.)
A. Compilation succeeds.
B. The output is "number 1".
C. The output is "number 3".
D. Compilation fails due to an error on line 5.
E. Compilation fails due to an error on line 6.
F. Compilation fails due to an error on line 9.
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