• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Puzzled

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends,
I'm puzzled with the behaviour of the code,Situation is like this.I've a class 'A' which is a Abstaract class.Now i created one more class 'B' which is not abstract but extends class 'A'.
The above is done using WSAD tool.When i looked in class 'B' it appeared with no constructor
nothing like like
public B(){

}
But allows me to contruct a constructor in class B manualy.I'm wondering why the constructor is not created automaticaly???. What is that issue behind this??.plz help me to know it better.
Thanks in advance
prashu
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you do not explicitly add a constructor, then the compiler will automatically add the default no argument constructor to the class file. It will not, however, automatically add the constructor to the source file.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Prashanth --

A belated welcome to JavaRanch. You may not have read our naming policy on the way in. It reqiures that you use a full, real (sounding) first and last name for your display name. A single name isn't enough. You can change your display name here. Thanks.
 
reply
    Bookmark Topic Watch Topic
  • New Topic