English Русский Contacts Site map Add to favorites
Registration
Login
Master braindump list
New braindumps
Submit a dump
Get latest dump
braindumps.com.ua
flame
3COM (7)
Adobe (1)
BEA (1)
Checkpoint (22)
Cisco (20)
Citrix (21)
CIW (15)
Compaq (0)
CompTIA (51)
CWNA (2)
EMC (2)
Exin (4)
GEJOS (4)
HDI (1)
HP (4)
IBM (13)
Juniper (5)
Linux Prof Institute (LPI) (2)
Lotus (11)
Microsoft (2462)
Network Appliance (2)
Novell (16)
Oracle (423)
PLSQL (1)
PMI (5)
SAS (1)
Sun (87)
Teradata (4)
Login:
Password:
RSS feed

Contacts
Certification links
Links
Authorized user can see question and answers.
Please log in or sign up.

Exam question list:
Show all comments
Sun 310-035: Sun Certified Programmer for Java 2 Platform 1.4
#71. You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

Show comments for this question (0)
Add comments
Link to this question

#72. Given:
  1. 1. class Exc0 extends Exception { }
  2. 2. class Exc1 extends Exc0 { }
  3. 3. public class Test {
  4. 4. public static void main(String args[]) {
  5. 5. try {
  6. 6. throw new Exc1();
  7. 7. } catch (Exc0 e0) {
  8. 8. System.out.println(“Ex0 caught”);
  9. 9. } catch (Exception e) {
  10. 10. System.out.println(“exception caught”);
  11. 11. }
  12. 12. }
  13. 13. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#73. Given:
  1. 20. public float getSalary(Employee e) {
  2. 21. assert validEmployee(e);
  3. 22. float sal = lookupSalary(e);
  4. 23. assert (sal>0);
  5. 24. return sal;
  6. 25. }
  7. 26. private int getAge(Employee e) {
  8. 27. assert validEmployee(e);
  9. 28. int age = lookupAge(e);
  10. 29. assert (age>0);
  11. 30. return age;
  12. 31. }
Which line is a violation of appropriate use of the assertion mechanism?

Show comments for this question (0)
Add comments
Link to this question

#74. Given:
  1. 1. public class A {
  2. 2. void A() {
  3. 3. System.out.println(Class A”);
  4. 4. }
  5. 5. public static void main(String[] args) {
  6. 6. new A();
  7. 7. }
  8. 8. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#75. Given:
  1. 1. class Bar { }
  2. 1. class Test {
  3. 2. Bar doBar() {
  4. 3. Bar b = new Bar();
  5. 4. return b;
  6. 5. }
  7. 6. public static void main (String args[]) {
  8. 7. Test t = new Test();
  9. 8. Bar newBar = t.doBar();
  10. 9. System.out.println(“newBar”);
  11. 10. newBar = new Bar();
  12. 11. System.out.println(“finishing”);
  13. 12. }
  14. 13. }
At what point is the Bar object, created on line 3, eligible for garbage collection?

Show comments for this question (1)
Add comments
Link to this question

#76. Given:
  1. 1. interface Beta {}
  2. 2.
  3. 3. class Alpha implements Beta {
  4. 4. String testIt() {
  5. 5. return “Tested”;
  6. 6. }
  7. 7. }
  8. 8.
  9. 9. public class Main1 {
  10. 10. static Beta getIt() {
  11. 11. return new Alpha();
  12. 12. }
  13. 13. public static void main( String[] args ) {
  14. 14. Beta b = getIt();
  15. 15. System.out.println( b.testIt() );
  16. 16. }
  17. 17. }
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#77. Given:
  1. 11. public class Test {
  2. 12. public void foo() {
  3. 13. assert false;
  4. 14. assert false;
  5. 15. }
  6. 16. public void bar(){
  7. 17. while(true){
  8. 18. assert false;
  9. 19. }
  10. 20. assert false;
  11. 21. }
  12. 22. }
What causes compilation to fail?

Show comments for this question (0)
Add comments
Link to this question

#78. Which statement is true?

Show comments for this question (0)
Add comments
Link to this question

#79. In which two cases does the compiler supply a default constructor for class A? (Choose two)

Show comments for this question (0)
Add comments
Link to this question

#80. Given:
  1. 1. public class ReturnIt {
  2. 2. return Type methodA(byte x, double y) {
  3. 3. return (short)x / y * 2;
  4. 4. }
  5. 5. }
What is the narrowest valid returnType for methodA in line2?

Show comments for this question (0)
Add comments
Link to this question


 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] ... [29 
Up ^ gen. 0.197 Server date 05:42 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump
User braindumps