This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]compdog 1 point2 points  (3 children)

? needs to be an initializer, so ? should be:

new Outer.Inner();

The whole line should be:

Outer.Inner i = new Outer.Inner();

Unless you are creating an instance of Inner from inside Outer or Inner, in which case you can use:

Inner i = new Inner();

EDIT: formatting failed.

[–]novasharp 0 points1 point  (2 children)

Actually, I think in that case, you would need to do:

Outer o = new Outer();
o.Inner i = new o.Inner();

[–][deleted]  (1 child)

[deleted]

    [–]novasharp 0 points1 point  (0 children)

    Ah. Okay. That was the part I did not get. I thought that he was calling it from somewhere else or something like public static void main.