JAVA DUMPS 9(SCJP)

QUESTION NO: 44

Given:

11. for (int i =0; i <3; i++) {

12. switch(i) {

13. case 0: break;

14. case 1: System.out.print("one ");

15. case 2: System.out.print("two ");

16. case 3: System.out.print("three ");

17. }

18. }

19. System.out.println("done");

What is the result?

A. done

B. one two done

C. one two three done

D. one two three two three done

E. Compilation fails.

Answer: D

QUESTION NO: 45

Which three statements are true? (Choose three)

A. The default constructor initializes method variables.

B. The default constructor has the same access as its class.

C. The default constructor invoked the no-arg constructor of the superclass.

D. If a class lacks a no-arg constructor, the compiler always creates a default constructor.

E. The compiler creates a default constructor only when there are no other constructors

for the class.

Answer: B, C, E

QUESTION NO: 46

Which three statements are true? (Choose three)

A. Assertion checking is typically enabled when a program is deployed.

B. It is never appropriate to write code to handle failure of an assert statement.

C. Assertion checking is typically enabled during program development and testing.

D. Assertion checking can be selectively enabled or disable an a per-package basis, but

not on a per-class basis.

E. Assertion checking can be selectively enabled or disabled on both a per-package basis

and a per-class basis.

Answer: B, C, E

QUESTION NO: 47

Which statement is true?

A. A try statement must have at least one corresponding catch block.

B. Multiple catch statements can catch the same class of exception more than once.

C. An Error that might be thrown in a method must be declared as thrown by that

method, or be handled within that method.

D. Except in case of VM shutdown, if a try block starts to execute, a corresponding

finally block will always start to execute.

E. Except in case of VM shutdown, if a try block starts to execute, a corresponding

finally block must always run to completion.

Answer: E

QUESTION NO: 48

Given:

1. class A {

2. final public int method1(int a, int b) {return 0; }

3. }

4. class B extends A {

5. public int method1(int a, int b) { return 1; }

6. }

7. public class Test {

8. public static void main(Strings args[]) {

9. B b;

10. System.out.println("x = " + b.method1(0, 1));

11. }

12. }

What is the result?

A. x = 0

B. x = 1

C. Compilation fails.

D. En exception is thrown at runtime.

Answer: C

1 comments:

your way said...

I took training in a institute for passing the exam and took scjp6 using these dumps and got 93% marks. Not to mention all questions are from them. These can be really relevant if you are looking forward to get good marks. If anybody want them mail me at mp7504@gmail.com. I am giving them for 300rs, its not a freebie material.

Post a Comment