• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Inner classes

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which of the following statements are true regarding Inner classes or class where they are declared and instantiated.
A. new SimpleInterface(){}
B. new ComplexInterface(){}
C. Myclass extends Object {}
D. new Myclass extends Object {}
E. abstrct class inner
F. private class C
G. new MyInterface(x) {}
My ans is A,B,C,E,F
Can anyone tell me the ans?
Thanks in advance,
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anand,
Check this out.
http://www.javaranch.com/ubb/Forum24/HTML/002486.html
 
Anand Kaimal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Ramesh!

Originally posted by Ramesh Donnipadu:
Anand,
Check this out.
http://www.javaranch.com/ubb/Forum24/HTML/002486.html


 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All:
First things first - The two questions are slightly different. I am referring to the previous posting referenced by Ramesh:
This is in response to the previous posting http://www.javaranch.com/ubb/Forum24/HTML/002486.html
I will have to disagree with Ajith (though I am doing it quite late - ajith's posting was on July 18th or so )when he says answer B is not correct. Please correct me if I am wrong.
No where it is mentioned that ComplexInterface is an interface. So, just for the sake of discussion, ComplexInterface could be a class, right? In which case, it is legal to call the super class constructor in the anonymous class declaration and initialization as in new ComplexInterface(x) {}.
Awaiting responses!
 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic