answersLogoWhite

0

What is abstract in java?

Updated: 11/2/2022
User Avatar

Wiki User

11y ago

Best Answer

Abstraction

Abstraction is simplifying complex reality by modelling classes appropriate to the problem, and working at the most appropriate level of inheritance for a given aspect of the problem.

For example, Lassie the Dog may be treated as a Dog much of the time, a Collie when necessary to access Collie-specific attributes or behaviors, and as an Animal (perhaps the parent class of Dog) when counting Timmy's pets.

Abstraction is also achieved through Composition. For example, a class Car would be made up of an Engine, Gearbox, Steering objects, and many more components. To build the Car class, one does not need to know how the different components work internally, but only how to interface with them, i.e., send messages to them, receive messages from them, and perhaps make the different objects composing the class interact with each other.

More simply,

Abstraction is to represent essential features of a system without getting involved in the complexity of the entire system.

The process of reducing an object to its essence so that only the necessary process of reducing an abject to its essence so that only the necessary element are represented abstraction defines an object in terms of its properties(attributes),behaviour(functionality), and interface.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

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.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is abstract in java?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is Abstract-Interface in java?

All interfaces are abstract.


What has the author D S Malik written?

D. S. Malik has written: 'Java Programming' 'Java programming' -- subject(s): Java (Computer program language) 'Fundamentals of abstract algebra' -- subject(s): Abstract Algebra, Algebra, Abstract 'C++ Programming'


Are all java stream class an abstract?

yes


Interface in java?

include all abstract method


When do you declare a method or class abstract in java?

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


What do mean by interface in java?

An interface in Java is like an abstract class, but there are no method bodies allowed in it and it has to be declared with the interface keyword. It is Java's way of getting around the Deadly Diamond of Death. Only abstract methods and constants are allowed in it.


Send mobile banking project using java abstract?

ikkk


Is built-in data-type are abstract data-types in java?

All built-in data types are not abstract data types.


What is interface in java?

Interface is collection of abstract methods which has only declaration and no implementation


What kind of constructs can be declared in a Java interface?

Constants and abstract methods. That's it.


How do you achieve abstraction in java?

Abstraction in Java is achieved using interfaces and abstract class. abstract means something which is not complete or concrete but abstraction itself is a great programming concept and allow you to write code which is more flexible to change.


Abstract method with example in java?

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.