Summer Special Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 8w52ceb345

Dennis works as a Programmer in Broadnet Inc.

Dennis works as a Programmer in Broadnet Inc. He writes the following program.

1. public class Ques0307{

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

3. int arr[] = {1, 2, 3, 4};

4. try{

5. int k = 0;

6. for(; k < 4; k++)

7. arr[k] = arr[k] + 1;

8. System.out.println("try");

9. }

10. catch(ArrayIndexOutOfBoundsException a){

11. System.out.println("index " +k +" not found");

12. }

13. catch(Exception e){

14. System.out.println("catch1");

15. }

16. finally{

17. System.out.println("finally");

18. }

19. }

20. }

What will happen when Dennis attempts to compile and execute the program?

A.

A compile-time error will occur.

B.

The program will display index 0 not found catch1 finally

C.

The program will display index 4 not found finally

D.

The program will display try finally

GSSP-Java PDF/Engine
  • Printable Format
  • Value of Money
  • 100% Pass Assurance
  • Verified Answers
  • Researched by Industry Experts
  • Based on Real Exams Scenarios
  • 100% Real Questions
buy now GSSP-Java pdf
Get 60% Discount on All Products, Use Coupon: "8w52ceb345"