Given two files:
1. package x;
2. public class J {
3. int a = 1;
4. protected int b = 2;
5. public int c = 3;
6. }
3. package y;
4. import x.*;
5. public class H {
6. public static void main(String[] args) {
7. J j = new J();
8. System.out.print(" " + j.a);
9. System.out.print(" " + j.b);
10. System.out.print(" " + j.c);
11. }
12. }
http://www.blogger.com/img/blank.gif
What is the result? (Choose all that apply.)
A. 1 2 3
B. 1 followed by an exception
C. Compilation fails with an error on line 7
D. Compilation fails with an error on line 8
E. Compilation fails with an error on line 9
F. Compilation fails with an error on line 10
DOWNLOAD the answer
This is your world! It's not just Java
Leave a Message
Blog Archive
-
▼
2011
(40)
-
▼
October
(11)
- Quiz of the Day | OCPJP (35)
- Quiz of the day | OCPJP (34)
- Quiz of the day | OCPJP (33)
- Quiz of the day | OCPJP (32)
- Quiz of the day | OCPJP (31)
- Quiz of the day | OCPJP (30)
- Quiz of the day | OCPJP (29)
- Quiz of the day | OCPJP (28)
- Quiz of the day | OCPJP (27)
- Quiz of the day | OCPJP (26)
- Quiz of the day | OCPJP (22)
-
▼
October
(11)
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