class Foo { class Bar{ } } class Test { public static void main (String [] args) { Foo f = new Foo(); /* Line 10: Missing statement ? */ } } which statement, inserted at line 10, creates an instance of Bar? - Study24x7
Social learning Network
02 Mar 2023 04:06 PM study24x7 study24x7

class Foo { class Bar{ } } class Test { public static void main (String [] args) { Foo f = new Foo(); /* Line 10: Missing statement ? */ } } which statement, inserted at line 10, creates an instance of Bar?

A

Foo.Bar b = new Foo.Bar();

B

Foo.Bar b = f.new Bar();

C

Bar b = new f.Bar();

D

Bar b = f.new Bar();

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles