Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Page 659 Q1

 
Thomas Jonsson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Isn't the D option correct as well?
MyInner m = new MyOuter.MyInner();

It compiles and runs.

My english may fool me.

All the best,
Thomas
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Page 659 of what?

Many people do not have the book you have, so please make the effort to give as much information as possible about the problem.
[ December 18, 2006: Message edited by: Barry Gaunt ]
 
Joe Harry
Ranch Hand
Posts: 10105
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is from the K&B book. I feel that only option A is correct. You cannot refer to an inner class without an outer reference. Option D would be correct if you have an import statement that imports the outer class in some other package. Watch the question as it asks in some other package. If it were in the same package, then option d is also correct.
[ December 18, 2006: Message edited by: Jothi Shankar Kumar Sankararaj ]
 
Thomas Jonsson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No I see. Thank you!

And I will be more precise in my coming questions...
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic