JAVA DUMPS 7(SCJP)



QUESTION NO: 33


Given:

1. class Super {

2. public Integer getLenght() { return new Integer(4); }

3. }

4.

5. public class Sub extends Super {

6. public Long GetLenght() { return new Long(5); }

7.

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

9. Super sooper = new Super();

10. Sub sub = new Sub();

11. System.out.println(

12. sooper.getLenght().toString() + "," +

13. sub.getLenght().toString() );

14. }

15. }


What is the output?

A. 4,4

B. 4,5

C. 5,4

D. 5,5

E. Compilation fails.


Answer: A


QUESTION NO: 34


Given:

1. public class Test {

2. public static String output ="";

3.

4. public static void foo(int i) {

5. try {

6. if(i==1) {

7. throw new Exception();

8. }

9. output += "1";

10. }

11. catch(Exception e) {

12. output += "2";

13. return;

14. }

15. finally {

16. output += "3";

17. }

18. output += "4";

19. }

20.

21. public static void main(String args[]) {

22. foo(0);

23. foo(1);

24.

25. }

26. }


What is the value of the variable output at line 23?


Answer: 13423


QUESTION NO: 35


Given:


10. public Object m() {

11. Object o = new Float(3.14F);

12. Object [] oa = new Object[1];

13. oa[0] = o;

14. o = null;

15. return oa[0];

16. }


When is the Float object, created in line 11, eligible for garbage collection?

A. Just after line 13.

B. Just after line 14.

C. Never in this method.

D. Just after line 15 (that is, as the method returns).


Answer: B


QUESTION NO: 36


Given:

1. class Base {

2. Base() { System.out.print("Base"); }

3. }

4. public class Alpha extends Base {

5. public static void main( String[] args ) {

6. new Alpha();

7. new Base();

8. }

9. }

What is the result?

A. Base

B. BaseBase

C. Compilation fails.

D. The code runs with no output.

E. An exception is thrown at runtime.


Answer: B


QUESTION NO: 37


Given:

11. int i = 1,j = -1;

12. switch (i) {

13. case 0, 1:j = 1;

14. case 2: j = 2;

15. default; j = 0;

16. }

17. System.out.printIn("j="+j);


What is the result?

A. j = -1

B. j = 0

C. j = 1

D. j = 2

E. Compilation fails.


Answer: E


QUESTION NO: 38


Given:

1. public class X {

2. public static void main(String [] args) {

3. try {

4. badMethod();

5. System.out.print("A");

6. }

7. catch (Exception ex) {

8. System.out.print("B");

9. }

10. finally {

11. System.out.print("C");

12. }

13. System.out.print("D");

14. }

15. public static void badMethod() {}

17. }


What is the result?

A. AC

B. BD

C. ACD

D. ABCD

E. Compilation fails.


Answer: C

8 comments:

abc said...

hi friend my name is kalyan
i am really happy to see you people helping us in doing certifications,thank you very much
if you don't mine can you put reason for each question

Anonymous said...

QUESTION NO: 35, C. Never in this method. is correct answer.

Anonymous said...

Why C is the correct answer?

Anonymous said...

Candidates who find exam really challenging and not confidant about their success, dumps are good substitute for them as they ensure your success as most of the questions are from them. If anybody interested in SCJP6 dumps..mail me at mp7504@gmail.com.

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.

Anonymous said...

What is the benefit in getting the certification by reading the dumps ? It doesn't help you in any thing.

Bhuvaneshwaran Duraisamy said...

For question 36, A is the correct answer

Rahul Aditya said...

Are you looking for latest ocjp/scjp 6-7 dumps
find latest dumps and updates at https://www.facebook.com/OCJP6

Post a Comment