Computer Science, asked by vcingawale5637, 1 year ago

A class in which one or more methods are only implemented to raise an exception is called an abstract class. True or false?

Answers

Answered by arpita8137
4

true

I HOPE MARK BRAINLEST

Answered by pragyakirti12345
0

Answer: True

Concept : Abstract Class

Given : A class in which one or more methods are only implemented to

            raise an exception is called an abstract class.

To Find : Whether the given sentence is true or false ?

Explanation :

Abstract classes are those classes which are declared as abstract. An abstract class can have both abstract method or a non - abstract method. An abstract class cannot be instantiated, means creating an object of that class. Abstract classes are extended and abstract methods are  implemented . It can have constructors, static methods, and final method.

In abstract class methods are implemented to raise an exception.

Example :

abstract class Game{  

 abstract void run();  

}  

class Basketball extends Game{  

void run()

{

System.out.println("Run Fast");

}  

public static void main(String args[]){  

Game obj = new Basketball();  

obj.run();  

}  

}  

Output : Run Fast

#SPJ3

Similar questions