reflection - .class file in java -


Can anyone guide me in this problem (Remember this problem under the Java Reflection context) There is a Java class named "A" with an internal class named

"B" . When I compile this Java file, it creates 2 versions. Class file named "Eccles" & amp; "A $ b class" and if there are 2 internal classes i.e. B, C in the "A" category 3 versions will be created "A class" & amp; "A $ B Class " & amp; "A $ C class"
Why does this happen

And if I want to read the .class file, then what class file I've read B / C, Then it will ask for A $ B class and be given by: java. Lang.ClassNotFoundException: A $ B class

And if we give the A $ B class it will give exceptions

  java.lang.NoClassDefFoundError: Java.lang .classNotFoundException class A {string_name = "tom"; Square b {int _phoneNo = 8384040; }}    

There is a Java class named "A" "Internal class named"

So you have two classes and you should have two squares files.

If there are 2 internal classes in the "A" class B, C

You have three squares and three category files.

And if I want to read the .class file, then read the class file B / C when I gave a class, then it will ask for A $ B class < P> When you read the Echlus file, you are just reading a file. It does not ask you for anything else.

And for this reason: java.lang.ClassNotFoundException: A $ bclass

This class only if your class is not in the path, There is a different and unrelated thing in the way.


It is such that you load classes, but make examples of those classes. There is no need to read underlying sections, or even know how they are organized on the disk.

  A a = new A (); // makes an example of AAB = a.new AB (); Creates an example of // AB which is "inside" 'A'.    

Comments