• 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

Can anybody help me?

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. How we can call a constructor of an abstract class (also from its inherited class)?
2. How can we get a value of a method of a class(any type) in return using NO return statement in that particular method?
Please help in this regard!
Thanks,
Sai Ram.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. You can call a parent constructor by calling super(any arguments) as the first line in your constructors. Note, however, that you cannot do things like super.super() as this implies knowledge of the implementation which is not OO.
2. Could you explain what you mean here ?
 
SaiRam NageshKumar
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose a method myMethod() is there its return type is not void but any thing else. But the restriction is it has no return statement at all.

now I want this method is called from another method or class or from a main() block.
I hope this time its clear!
Your answer to the first q is not been cleared. Please let me know in detail.
regds,
Sai Ram.
[This message has been edited by SaiRam NageshKumar (edited April 20, 2000).]
[This message has been edited by SaiRam NageshKumar (edited April 20, 2000).]
[This message has been edited by SaiRam NageshKumar (edited April 20, 2000).]
 
Ranch Hand
Posts: 1467
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SaiRam NageshKumar,
Your code will not compile at all. Because a method which returns something other than void has to return some return value which is compatible with the declared return type of the method.
I am not sure what you want actually. May be I didn't get you exactly.
regds
maha anna
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic