当前位置:网站首页>2022/07/28 learning notes (day18) common APIs
2022/07/28 learning notes (day18) common APIs
2022-07-29 02:30:00 【Radical cucumber】
JDK.API download :
link :https://pan.baidu.com/s/1H0YYohJR198fODMWkrIC2Q
Extraction code :6671
API:
1. What is? API:
API(Application Programming Interface, Application programming interface ) Are some predefined functions , The purpose is to provide the ability for applications and developers to access a set of routines based on certain software or hardware , Without access to the source code , Or understand the details of the internal working mechanism .
—— Baidu Encyclopedia
API(Application Programming Interface), That is, the application programming interface
2. How to use API
a. Interface is introduced :

b. describe

c. Construction method :

d. Member method :

Commonly used API:
API(Application Programming Interface) Application program interface
JDK Provide us with some classes that have been written , We can adjust the method directly to solve the problem
String( It can be called API Interface )
Methods of our class , Macroscopically, it can be called interface
Date class :
Date:

compareTo:

When you return a negative number , It indicates that the caller time is before the parameter time .
When to return to 0 when , It indicates that the caller time is the same as the parameter time .
When a positive number is returned , Explain that the caller's time is after the stated time .
Calendar class : date 、 Time
Calendar Is an abstract class , can new Cannot create object
initialization ;
Provides a set of pairs “ Specific date 、 Minutes and seconds 、 week ” And other information operation functions . You can manipulate information in different time zones .
JDK1.1 Version start , When processing time and date , System recommended Calendar class
Calendar than Date Much more powerful

Unless you want to get the month, day, hour, minute and second at one time , Otherwise, all use calendar
The time zone :

ZoneId:

Date formatting :
SimpleDateFormat:
format: format Date type , hold Date Type into String type
We want to show the data to the client
parse: hold String Type of time , Turn into Date type
The time transmitted from the client , It's usually String type , Store in database .

The duration of the Duration:

Get the current date LocalDate:


Determine if it's a leap year :

Local time LocalTime:

Get day and time LocalDateTime:

Deal with the formatting of dates DateTimeFormatter:

hold Instant Turn into Date:

hold Date Turn into Instant:

hold Instant Turn into LocalDateTime:
hold LocalDateTime Turn into Instant :

hold Date Turn into LocalDateTime:

hold LocalDateTime Turn into Date:
BigDecimal Statistics :

Random classes Random:

Arrays—— Array tool class
Sort of array :

Array search :
v
Array copy :

Array comparison :

System class —— System class :

Interview questions : The difference between the three strings :

边栏推荐
- Interprocess communication - detailed explanation of the pipeline (explanation of graphic cases)
- 多线程浅谈
- ES6事件绑定(v-on用法)
- Responsive dream weaving template outdoor camping website
- 数据安全与隐私计算峰会-安全求交集在隐私计算中的发展和应用:学习
- Data security and privacy computing summit - development and application of security intersection in privacy Computing: Learning
- Esbuild Bundler HMR
- How to guarantee password security? How does the secure browser manage passwords?
- 详解异步任务:任务的状态及生命周期管理
- 进程间通信---对管道的详细讲解(图文案例讲解)
猜你喜欢
随机推荐
基于对象的实时空间音频渲染丨Dev for Dev 专栏
一文理解分布式开发中的服务治理
矿山开采虚拟现实vr安全培训提升员工警惕性和防护意识
DevOps 团队如何抵御 API 攻击?
Vector similarity evaluation method
How does the Devops team defend against API attacks?
[golang learning notes 2.2] map, structure and interface
Explain asynchronous tasks in detail: task status and lifecycle management
Thermistor temperature calculation formula program
3种过期策略
多线程浅谈
响应式织梦模板装修设计类网站
ES2022 的 8 个实用的新功能
Esbuild Bundler HMR
Custom MVC principle and framework implementation
响应式织梦模板化妆美妆类网站
工程经济学名词解释
响应式织梦模板家装建材类网站
3d智能工厂工艺流转可视化交互展示应用优点
聊聊接口性能优化的11个小技巧









