当前位置:网站首页>大一暑假实习day7总结
大一暑假实习day7总结
2022-07-22 18:07:00 【chy响当当】
PS:注解和反射在后面
目录
1.学习用API

2.常用API
(1)math

(2)system


(3)runtime

(4)object
tostring


equals,(建议多看原码)


clone(浅克隆,深克隆)

public class user implements Cloneable{
String name;
String password;
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
public user() {
}public class Test {
public static void main(String[] args) throws CloneNotSupportedException {
user a = new user("123", "123");
user b=(user)a.clone();
System.out.println(a);
System.out.println(b);
}
}



string因为是串池管理的,所以还是复用地址值

object的克隆是浅克隆
所以要深克隆得自己处理

但是可以用第三方Jar包之类的。

(5)BigInteger (上下限极大极大),但只能给整数形式



注意这里是静态方法才范围小
注意:



一些内部原理:

无限!!
(6)BigDecimal(精确表示小数)



方法:

!!!!!!!不要记,要有个印象,然后学会用API查询
下面记录一些底层一点的东西:


其实bigdecimal和biginteger和以前做的大整数思想一样,都是用数组来进行拓展的。
总结:

3.正则表达式
(1)体验一下:高效快捷

(2)规则:


![]()
注意:

因此,这里\\d也一样:

可以在API的pattern类里面查找。
(3)下面是3道练习



实际开发中,网上找一个差不多的正则,然后自己改一改,还可以下载anyrule
(4)再来几道练习题:


而下面这个是只忽略b的大小写
![]()



边栏推荐
- leetcode-188. 买卖股票的最佳时机 IV
- JS - - date Object & Ternary expression
- 《CTFHub web信息泄露等部分题目wp|CSDN创作打卡》
- Pointers and functions
- Leetcode-646. longest number pair chain
- "Dial" out the number on the number of digits - a variety of ideas to achieve reverse output of a four digit number
- C语言实现扫雷
- leetcode-343. 整数拆分
- MQ Getting Started tutorial
- leetcode-494.目标和
猜你喜欢
随机推荐
leetcode-312.戳气球
Hefei University of technology information theory and coding course design, including code, visual interface, course design report
代码随想录笔记_数组_977有序数组的平方
C语言求质数的几种简单易懂方法
Detailed explanation of Axi agreement
libcurl重定向
Leetcode-241. design priorities for operational expressions
Construction training camp module II operation
Solve the master-slave replication problem of MySQL under CentOS
12月1日作业
表单验证和正则表达式(二)
[Err] 1064 - You have an error in your SQL syntax;
C语言中的冒泡排序
leetcode-172.阶乘后的零
Code random notes_ Array_ 209 subarray with the smallest length
C语言实现三子棋
leetcode-415.字符串相加
Exercise + floating point stored in memory
leetcode-买卖股票的最佳时机含手续费
wondows环境搭建








