In this article we will look at abstract keyword in Java. We will learn what is the use of abstract keyword and how to use it in Java programs. Uses of abstract keyword Following are the uses of abstract keyword in Java: Used to create abstract methods Used to create abstract classes Creating abstract methods Sometimes while creating hierarchies, a method inside a super class might not be suitable to have any kind of implementation. Such methods can be declared as abstract using the abstract keyword. Syntax for creating an abstract method is as follows: abstract return-type method-name(parameters-list); As candidate example for abstract
The post What is the use of the abstract keyword in Programming appeared first on Coding Security.
What is the use of the abstract keyword in Programming
read more
Tidak ada komentar:
Posting Komentar