answersLogoWhite

Top Answer
User Avatar
Wiki User
Answered 2010-10-17 15:59:58

a abstract class is class which has a abstract method which means a method does not its own body.

001
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Your Answer

Related Questions


Abstract keywordused for method declaration declares the methods without implementations. Abstract class in java have abstract methods that is not implemented in abstract class, but implemented in subclasses in java program. If the class in java program is not required to get instantiated than that class use the abstract keyword but this class rather is available for other classes to extend by other classes. Abstract keyword will be used in method declaration to declare that method without providing the implementation in that java program. In other words we can say that, it formally unfinished class as well as method, that marked with the help of keyword abstract. Defining abstract is a way of preventing someone from instantiating a class that is supposed to be extended first. In java program abstract class is deliberately missing similar to like an interface which will missing all method bodies in the program. Abstract class provides a way to extend an actual class. We will not use new on abstract classes but will use abstract references in the java program, that always point to objects of the class that extends an abstract class. In java program for practical use of an abstract class, we will define a non-abstract class that extends an abstract one. This will use any of the inherited non-abstract methods. Most of the time abstract class may extend another abstract class. In that condition it need not implement all in the non-abstract methods. An abstract keyword used both on classes and methods. In case of class declared with an abstract keyword may not be instantiated that is the only thing that abstract keyword doing.


when overriding of a class or a method is necessary, they can be declared as abstract


Abstract keyword used for method declaration declares the methods without implementations. Abstract class in java have abstract methods that is not implemented in abstract class, but implemented in subclasses in java program. If the class in java program is not required to get instantiated than that class use the abstract keyword but this class rather is available for other classes to extend by other classes. Abstract keyword will be used in method declaration to declare that method without providing the implementation in that java program. In other words we can say that, it formally unfinished class as well as method, that marked with the help of keyword abstract. Defining abstract is a way of preventing someone from instantiating a class that is supposed to be extended first. In java program abstract class is deliberately missing similar to like an interface which will missing all method bodies in the program. Abstract class provides a way to extend an actual class. We will not use new on abstract classes but will use abstract references in the java program, that always point to objects of the class that extends an abstract class. In java program for practical use of an abstract class, we will define a non-abstract class that extends an abstract one. This will use any of the inherited non-abstract methods. Most of the time abstract class may extend another abstract class. In that condition it need not implement all in the non-abstract methods. An abstract keyword used both on classes and methods. In case of class declared with an abstract keyword may not be instantiated that is the only thing that abstract keyword doing.


An abstract in java is used to specify that the class/function is not yet complete. When a class in declared as abstract it means that it is not meant to be instantiated (you can't create variables of that type). This is because they are meant to be more of a guideline for other classes. When a class extends an abstract class it must either define all of the abstract methods from the abstract class or it must also be declared as an abstract class itself.


By using the abstract keyword in the class declaration line. Ex: public abstract ClassName {} The Java compiler will force you to use the abstract keyword in the class declaration line if one or more methods in your class are abstract (no implementation) or if you have not provided implementations for one or more methods of an interface that you are implementing in your class definition. You cannot instantiate an abstract class.


yes,abstract class can have non abstract methods,even it can have all non abstract method


An abstract class cannot have a constructor and hence you cannot invoke the constructor of the class - i.e., you can instantiate an abstract class and hence you cannot call the constructor of an abstract class.


An abstract class is just like any other class in java just with a little difference; at least one of his methods is not implemented (a abstract method). For this reason abstract classes can not be instantiated (create a sample of this class), and his unique purpose is to be inherited an implemented by others classes. This is a sample of a abstract class: public abstract class MyAbstract{ public void normalMethod(){//Do something} public abstract void abstractMethod(); }


An abstract class(or classes) can't have a constructor and hence you cannot invoke the constructor of the class (for example, you can instantiate an abstract class and hence you cannot call the constructor of an abstract class).


The keyword abstract is used to signify a class which does not offer the method definition for one or more methods in the class. A fully abstract class is equivalent to an interface.


A class loader is an object that is responsible for loading classes. The class ClassLoader is an abstract class.


An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class. Source: Refer Related Links


Differences:Abstract class can also contain method definitions but an interface can contain only declarationsAll variables in an interface are by default public static and final whereas in Abstract class it is notAn interface can be considered as a pure abstract class that contains no method implementations and contains only declarations.


No. The whole idea of an abstract class is that you can't instantiate it directly. You need to create subclasses first.


Yes. But cannot extend both of them at the same time. Meaning you can extend only one class at a time and that class can be abstract class or concrete class.


an abstract class is something which is incomplete and you can not create instance of it for using it.if you want to use it you need to make it complete by extending it.an abstract method in java doesn't have body , its just a declaration.


For Java: Yes, Reader is an abstract class in package of java.io; For C#: No, Reader is NOT one of the defined library classes. Of course you create one.


Abstract class must be extended/subclassed (to be useful). It serves as a template. A class that is abstract may not be instantiated (ie, you may not call its constructor), abstract class may contain static data. Any class with an abstract method is automatically abstract itself, and must be declared as such. A class may be declared abstract even if it has no abstract methods. This prevents it from being instantiated.


There sure can be, though it is generally considered bad style to do so. A source file with this code in it should compile without complaint: abstract class MyAbstractClass { }


This has to do with inheritance. An abstract method ensures that all inherited classes have such a method.


Yes. Any class that does not provide implementation to all its methods as well as its parent class methods needs to be Abstract. The Java compiler would not successfully compile a class that does not do this.


An abstract class is a class that can not be directly instantiated - you cannot create objects based on such a class. The class is declared as "abstract" because it is incomplete; the only way to use it is to create subclasses, in which the missing parts (missing methods) are completed.


Abstract classes are generally used where you want an amount of behaviour to be used by the class that extends the abstract class while at the same time giving options to the child class to provide a certain amount of behaviour itself.


An abstract method is a method that is declared without an implementation (without braces, and followed by a semicolon), like this: abstract void add(double X, double Y);If a class includes abstract methods, the class itself must be declared abstract


Abstraction in Java or Object oriented programming is a way to segregate implementation from interface and one of the five fundamentals along with Encapsulation, Inheritance, Polymorphism, Class and Object. Abstraction in Java is achieved by using interface and abstract class in Java.



Copyright ยฉ 2021 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.