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 Quick Hull Algorithm to Find Convex Hull
Java Program to Implement AttributeList API
Java Program to Implement AVL Tree
Giới thiệu JDBC Connection Pool
How to Get All Spring-Managed Beans?
Java Program to Implement Gale Shapley Algorithm
Configuring a DataSource Programmatically in Spring Boot
Initialize a HashMap in Java
Java Program to Check Whether a Directed Graph Contains a Eulerian Cycle
Java Program to Solve the 0-1 Knapsack Problem
Java Program to Find Minimum Element in an Array using Linear Search
Thao tác với tập tin và thư mục trong Java
A Guide to JUnit 5
Java Program to Implement Hash Tables Chaining with Binary Trees
Call Methods at Runtime Using Java Reflection
Java Program to Represent Graph Using Incidence List
Shuffling Collections In Java
Constructor Dependency Injection in Spring
How to Read a Large File Efficiently with Java
Java Program to Implement Pagoda
Java Program to Implement Pollard Rho Algorithm
Encode/Decode to/from Base64
Java Program to Implement Binary Search Tree
Properties with Spring and Spring Boot
String Joiner trong Java 8
Java Program to Implement Rolling Hash
Remove All Occurrences of a Specific Value from a List
Java Program to Implement the Vigenere Cypher
Introduction to Spring Method Security
Auditing with JPA, Hibernate, and Spring Data JPA
Login For a Spring Web App – Error Handling and Localization
Spring Security – security none, filters none, access permitAll