Tính trừu tượng (abstraction) là một trong bốn tính chất cơ bản của lập trình hướng đối tượng trong Java.
Tính trừu tượng là một tiến trình ẩn các chi tiết trình triển khai và chỉ hiển thị tính năng tới người dùng. Tính trừu tượng cho phép bạn loại bỏ tính chất phức tạp của đối tượng bằng cách chỉ đưa ra các thuộc tính và phương thức cần thiết của đối tượng trong lập trình.
Tính trừu tượng giúp bạn tập trung vào những cốt lõi cần thiết của đối tượng thay vì quan tâm đến cách nó thực hiện.
Trong Java, chúng là sử dụng abstract class và abstract interface để có tính trừu tượng. Chi tiết các bạn xem thêm ở bài viết: Abstract class và Interface trong Java.
Related posts:
Write/Read cookies using HTTP and Read a file from the internet
Java Program to Check whether Directed Graph is Connected using DFS
Tìm hiểu về xác thực và phân quyền trong ứng dụng
A Guide to Queries in Spring Data MongoDB
How To Serialize and Deserialize Enums with Jackson
Hướng dẫn Java Design Pattern – Builder
Java Program to Implement Hash Tables chaining with Singly Linked Lists
Java Program to Generate All Possible Combinations of a Given List of Numbers
HttpClient Basic Authentication
Java Program to Implement IdentityHashMap API
Hướng dẫn Java Design Pattern – Composite
Java Program to Solve Knapsack Problem Using Dynamic Programming
OAuth2 Remember Me with Refresh Token
Spring Boot - Quick Start
Java Program to Generate All Pairs of Subsets Whose Union Make the Set
Convert char to String in Java
The Order of Tests in JUnit
Một số ký tự đặc biệt trong Java
Java Program to Solve Set Cover Problem assuming at max 2 Elements in a Subset
Spring WebClient and OAuth2 Support
Spring 5 Testing with @EnabledIf Annotation
Java – Convert File to InputStream
Call Methods at Runtime Using Java Reflection
Java Program to Implement Dijkstra’s Algorithm using Set
Làm thế nào tạo instance của một class mà không gọi từ khóa new?
Testing in Spring Boot
Java Program to Implement the Hill Cypher
Mix plain text and HTML content in a mail
Từ khóa static và final trong java
Java Program to Generate Date Between Given Range
Easy Ways to Write a Java InputStream to an OutputStream
Transaction Propagation and Isolation in Spring @Transactional