Can u write constructor in abstract.If yes den when it will
be invoked.
Answers were Sorted based on User's Feedback
Answer / srinu
yes Abstract class contain constructor. if it will be
invoked the abstract class extending the class .Then that be
invoked.
Ex:
HttpServlet class is abstract class it contain
constructor.it will be invoked the other class extending
HttpServlet it will be invoked.
| Is This Answer Correct ? | 13 Yes | 2 No |
Answer / chaitali chari
You cannot have a abstract constructor. If you declare a
constructor as abstract then it would give any error while
compilation saying abstract modifier not allowed.
| Is This Answer Correct ? | 3 Yes | 18 No |
How do you compare two strings? any predefined method for this?
What is the difference between a constructor and a method?
What is data abstraction? Elaborate with example?
What is hash table in java?
Is ResultSet class?
5 Answers Bally Technologies, TCS,
What is a singleton puppy?
Is it possible to write a regular expression to check if string is a number?
What is update method called?
I have a class which is abstract which contains only the abstract methods. This is similar to an interface. Then, if i have given a choice to choose one of them. Which one i have to choose and why?
Can an object be garbage collected while it is still reachable?
If a class is declared without any access modifiers, where can the class be accessed?
Why main() method is public, static and void in java ?