in Object Oriented Programming recategorized
5,671 views
0 votes
0 votes

Which of the following statement(s) with regard to an abstract class in JAVA is /are TRUE ?

  1. An abstract class is one that is not used to create objects
  2. An abstract class is designed only to act as a base class to be inherited by other classes
  1. Only I   
  2.  only II 
  3. Neither I  nor II
  4. Both I and II
in Object Oriented Programming recategorized
5.7k views

3 Answers

1 vote
1 vote

class that is declared as abstract is known as abstract class. It needs to be extended and its method implemented. It cannot be instantiated.

An abstract class is designed only to act as a base class to be inherited by other classes.It is a design concept in program development and provides a base upon which other classes can be built

so ans is 4

1 comment

Hi Sanjay sir,

Please give me ur mail ID, I am preparing for NET so need some help from you.I am following all answer really a fan of you.

my mailid : [email protected]

Thanks

Satyajit
0
0
1 vote
1 vote

A class that is declared as abstract is known as abstract class. It needs to be extended and its method implemented. It cannot be instantiated.

hence answer is D ) both statements are true

by
0 votes
0 votes

correct answer is 4

Abstract Class

A class which contains the abstract keyword in its declaration is known as abstract class.

Abstract classes may or may not contain abstract methods, i.e., methods without body ( public void get(); )

But, if a class has at least one abstract method, then the class must be declared abstract

we can not create object for abstract class      reason : why ?

abstract class  is designed only to act as a base class to be inherited by other classes.

--------------------------------------------------------------------------------------------------------------------------------------------------

more information 

  • If you inherit an abstract class, you have to provide implementations to all the abstract methods in it

 

Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true