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
#51. Given:
  1. 1. class Super {
  2. 2. public int getLenght() { return 4; }
  3. 3. }
  4. 4.
  5. 5. public class Sub extends Super {
  6. 6. public long getLenght() { return 5; }
  7. 7.
  8. 8. public static void main(String[] args) {
  9. 9. Super sooper = new Super();
  10. 10. Sub sub = new Sub();
  11. 11. System.out.println(
  12. 12. sooper.getLenght() + “,” + sub.getLenght() );
  13. 13. }
  14. 14. }
What is the output?

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

#52. Given:
  1. 1. public class Test {
  2. 2. public static void main(String[] args) {
  3. 3. int x = 0;
  4. 4. assert (x > 0): “assertion failed”;
  5. 5. System.out.println(“finished”);
  6. 6. }
  7. 7. }
What is the result?

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

#53. You want to limit access to a method of a public class to members of the same class. Which access accomplishes this objective?

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

#54. Given:
  1. 11. switch(x) {
  2. 12. default:
  3. 13. System.out.println(“Hello”);
  4. 14. }
Which two are acceptable types for x? (Choose two)

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

#55. Given:
  1. 1. public class X {
  2. 2. public static void main(String [] args) {
  3. 3. try {
  4. 4. badMethod();
  5. 5. System.out.print(“A”);
  6. 6. }
  7. 7. catch (RuntimeException ex) {
  8. 8. System.out.print(“B”);
  9. 9. }
  10. 10. catch (Exception ex1) {
  11. 11. System.out.print(“C”);
  12. 12. }
  13. 13. finally {
  14. 14. System.out.print(“D”);
  15. 15. }
  16. 16. System.out.print(“E”);
  17. 17. }
  18. 18. public static void badMethod() {
  19. 19. throw new RuntimeException();
  20. 20. }
  21. 21. }
What is the result?

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

#56. Given:
  1. 1. public class Test {
  2. 2. public static void main(String[] args) {
  3. 3. int x = 0;
  4. 4. assert (x > 0) ? “assertion failed” : “assertion passed”;
  5. 5. System.out.println(“Finished”);
  6. 6. }
  7. 7. }
What is the result?

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

#57. Given:
  1. 1. public class ReturnIt {
  2. 2. return Type methodA(byte x, double y) {
  3. 3. return (long)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

#58. Given:
  1. 1. public class OuterClass {
  2. 2. private double d1 = 1.0;
  3. 3. // insert code here
  4. 4. }
Which two are valid if inserted at line 3? (Choose two)

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

#59. Given:
  1. 1. public class Foo {
  2. 2. public void main( String[] args ) {
  3. 3. System.out.println( “Hello” + args[0] );
  4. 4. }
  5. 5. }
What is the result if this code is executed with the command line? java Foo world

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

#60. Given:
  1. 11. public void foo( boolean a, boolean b ){
  2. 12. if( a ) {
  3. 13. System.out.println( “A” );
  4. 14. } else if ( a && b ) {
  5. 15. System.out.println( “A&&B” );
  6. 16. } else {
  7. 17. if ( !b ) {
  8. 18. System.out.println( “notB” );
  9. 19. } else {
  10. 20. System.out.println(ELSE);
  11. 21. }
  12. 22. }
  13. 23. }
What is correct?

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.245 Server date 06:07 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump
User braindumps