Skip to content
Advertisement

How to access private class inside a static nested class [closed]

JavaScript

Here How can I access the private class from the main() method.I can initialize static class object,after that how to initialize the private class?

Advertisement

Answer

Just access it. Also, you’ve got a static inner class and then a non-static inner inner. You don’t want to have non-static inner classes unless you fully understand java, and clearly, so far, you don’t, yet. So, that’s off limits for now.

JavaScript

or if you really must:

JavaScript

i.new??

Yeah. That’s the syntax. I told you you don’t want this for a reason.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement