can abstract class have constructor how can you achive
this ?
Answers were Sorted based on User's Feedback
Answer / rajasekharreddy.y
Yes abstract class must have the constructor, these
constructor we can achive by creating the instance of the
concreate subclass of the abstract class.
Is This Answer Correct ? | 14 Yes | 2 No |
Answer / bhargava
You cannot crate the constructor for an abstract class
directly. But you can create constructor for subclass for
an abstract class by making new class sub class for the
abstract class.
Is This Answer Correct ? | 1 Yes | 7 No |
Can we store variables in local blocks?
Define packages in java?
Difference between Web-based applications,Client- Server applications and Distributed applications?
Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target
Can we call a non-static method from inside a static method?
What is the purpose of garbage collection in java, and when is it used?
When should I use abstract classes and when should I use interfaces?
What classes of exceptions, caught by a catch clause?
Can we write multiple catch blocks under single try block?
How do you identify independent and dependent variables?
Is set ordered?
Why are lists ordered in java?