Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

why we use abstract class in java

Gabbar Virus answered on January 8, 2020 Popularity 3/10 Helpfulness 1/10

Contents


More Related Answers

  • how to instansiated abstract class
  • Can abstract methods have static keyword
  • can normal class have abstract method
  • how to create object of abstract class in java
  • is it necessary for abstract class to have abstract method
  • can you declare an abstract method in a non abstract class
  • abstract classes,
  • abstract class
  • Abstract method declaration
  • Can you add a constructor to an abstract class
  • abstract class java constructor
  • abstract class
  • what is abstract class
  • can abstract class have non abstract methods in java
  • can abstract class have constructor
  • what is abstract class with example
  • what are abstract classes in java
  • abstract class java
  • Java Abstract Method
  • Java Abstract Class

  • why we use abstract class in java

    0

    Sometimes we may come across a situation where we cannot provide

    implementation to all the methods in a class. We want to leave the

    implementation to a class that extends it. In such case we declare a class

    as abstract.To make a class abstract we use key word abstract.

    Any class that contains one or more abstract methods is declared as abstract.

    If we don’t declare class as abstract which contains abstract methods we get

    compile time error.

    1)Abstract classes cannot be instantiated(instantiated->creating an object)

    2)An abstract classes contains abstract method, concrete methods or both.

    3)Any class which extends abstract class must override all methods of abstract

    class

    4)An abstract class can contain either 0 or more abstract method.

    Popularity 3/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Mar 15 2023
    Gabbar Virus
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    156
    Popularity 10/10 Helpfulness 4/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Nov 30 2020
    Thankful Tuatara
    0 Answers  Avg Quality 2/10

    1
    Popularity 9/10 Helpfulness 3/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Dec 24 2023
    sam9934
    0 Answers  Avg Quality 2/10

    7
    Popularity 10/10 Helpfulness 3/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Mar 30 2021
    Vishal
    0 Answers  Avg Quality 2/10

    0
    Popularity 8/10 Helpfulness 2/10 Language java
    Tags: abstract java j
    Link to this answer
    Share Copy Link
    Contributed on Jan 28 2024
    Savindi Dadallage
    0 Answers  Avg Quality 2/10

    9
    Popularity 10/10 Helpfulness 2/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Nov 30 2020
    Thankful Tuatara
    0 Answers  Avg Quality 2/10

    2
    Popularity 10/10 Helpfulness 2/10 Language java
    Link to this answer
    Share Copy Link
    Contributed on Jun 18 2022
    Rasel Ahmed
    0 Answers  Avg Quality 2/10

    1
    Popularity 10/10 Helpfulness 2/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jan 08 2020
    Nitbit25
    0 Answers  Avg Quality 2/10

    0
    Popularity 10/10 Helpfulness 2/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on May 24 2022
    SAMER SAEID
    0 Answers  Avg Quality 2/10

    3
    Popularity 10/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jan 08 2020
    Nitbit25
    0 Answers  Avg Quality 2/10

    0
    Popularity 10/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Jan 30 2022
    coder
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.