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:
Java Program to Implement the RSA Algorithm
Spring Security Authentication Provider
Spring Boot - Building RESTful Web Services
RestTemplate Post Request with JSON
Registration – Activate a New Account by Email
Request Method Not Supported (405) in Spring
Apache Commons Collections OrderedMap
Java Program to Implement Hash Tables chaining with Singly Linked Lists
Java Program to Check if an UnDirected Graph is a Tree or Not Using DFS
Java Program to Use rand and srand Functions
Java Program to Check if it is a Sparse Matrix
Spring – Injecting Collections
Java Program to Implement Sorted Vector
Java Program to Implement Binary Heap
Introduction to Spring Data MongoDB
Auditing with JPA, Hibernate, and Spring Data JPA
Spring MVC Content Negotiation
Java Program to Implement Find all Back Edges in a Graph
Converting String to Stream of chars
Java Program to Perform the Sorting Using Counting Sort
Returning Custom Status Codes from Spring Controllers
The Java 8 Stream API Tutorial
Spring RestTemplate Request/Response Logging
Comparing Two HashMaps in Java
Java Program to Implement Skip List
Disable DNS caching
HttpClient 4 – Send Custom Cookie
Java Program to Implement LinkedList API
The Order of Tests in JUnit
Converting between an Array and a List in Java
Java – Delete a File
Documenting a Spring REST API Using OpenAPI 3.0