Question:What is the output of the given console application?
public class Test31 {
        public static void main(String[] args) {
                test();
        }
        public static void test() {
                try {
                        System.out.print("-try");
                        return;
                } catch (Exception e) {
                        System.out.print("-catch");
                } finally {
                        System.out.print("-finally");
                }
        }
}
 

A -try 

B -try-catch 

C -try-finally 

D -try-catch-finally 

+ Answer
+ Report
Total Preview: 641

Copyright © 2024. Powered by Intellect Software Ltd