Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyOuter {
- private MyInner inner;
- void createInner() {
- // The Compiler has to create a synthetic method
- // to construct a new MyInner because the constructor
- // is private.
- // --> synthetic "constructor" method
- inner = new MyInner();
- // The Compiler has to create a synthetic method
- // to doSomething on MyInner object because this
- // method is private.
- // --> synthetic "constructor" method
- inner.doSomething();
- }
- private class MyInner {
- // the inner class holds a syntetic ref_pointer to
- // the outer "parent" class
- // --> synthetic field
- private MyInner() {
- }
- private void doSomething() {
- }
- }
- }
- //...
- Thread myThread = new Thread() {
- public void run() {
- // do something ...
- }
- };
- myThread.start();
- //...
Add Comment
Please, Sign In to add comment