Q85.What is the result of attempting to compile and run the following program?0 [* b, l; y8 m7 e6 @& }1 r
1. public class Test {/ w2 @$ b# u' e+ X, ?5 P, }; O7 N
2. private int i = j;
2 v5 [) g% L! M0 S6 O 3. private int j = 10;
. ^' Y0 P' ? J4 a 4.3 p# K# I. ]* s" T& t" W) F; L2 V
5. public static void main(String args[]) {- G7 D' w R" q, D2 K7 F7 A2 k; l
6. System.out.println((new Test()).i);* Q% p# c/ S k( w- z: O1 y: ^
7. }
# h8 R$ T1 b" U. Q, k+ a* M+ t 8. }
7 J z8 N: A' R+ @# l8 t% r/ j [Select one correct answer]
% A& S; W' f% P) k+ }4 P a. Compiler error complaining about access restriction of private variables of Test.
2 x+ G4 M( w I7 Q0 c7 c b. Compiler error complaining about forward referencing.
% O' f6 |9 T- m* H- J) `5 m6 Q c. No error - The output is 0;, n3 D) I$ ?8 W% K. @
d. No error - The output is 10;
6 g7 v# u7 a* d: b$ ?1 I" v# b2 u Q86.What is the result of attempting to compile and run the following program
C0 v! @. X& ~/ q" x 1. public class A {
4 t4 ~) a6 [- n5 ` 2. private void method1() throws Exception {" @, @& f9 r! I
3. throw new RuntimeException();0 q% |- M" s, e1 f, k2 G3 ]: C) d
4. }
0 f& A7 ?- t/ O. V& k( t 6. public void method2() {% X8 n" f" y4 }9 _
7. try {% |0 q( ]% C. z% f$ G$ v
8. method1();2 a2 b( J# o9 R- i4 I$ n
9. } catch(RuntimeException e) {5 _; X8 J( F7 w" |9 E7 _* U
10. System.out.println(“Caught Runtime Exception”);
; n1 P) J; l$ {& b1 O 11. } catch(Exception e) {- |; G* [7 |0 E' f8 i
12. System.out.println(“Caught Exception”);
" |' \' J( n% B1 f 13. }1 _8 @. d( v7 N. y' i7 K+ P2 j6 h
8 K. H5 k; m! U! {
14. } |