摘要: 概念 精确运算极大数和极小数要用到,其本质是字符串。(慢) 案例 点击查看代码 public static void main(String[] args) { BigDecimal b1 = new BigDecimal("1"); BigDecimal b2 = new BigDecimal(" 阅读全文
posted @ 2023-03-17 21:27 卡卡罗特kk 阅读(168) 评论(0) 推荐(0)
摘要: 字符串的内存问题 点击查看代码 public static void main(String[] args) { String str1 = "卡卡罗特"; String str2 = "卡卡罗特"; String str3 =new String("卡卡罗特"); String str4 =new 阅读全文
posted @ 2023-03-17 20:48 卡卡罗特kk 阅读(31) 评论(0) 推荐(0)
摘要: 包装类:基于基本数据类型所对应的引用类型,包装类既然是引用类型,那么其拥有null值,以及对应的API。 1、创建 数值类形的创建 点击查看代码 public class Test1 { public static void main(String[] args) { //数值 Integer i1 阅读全文
posted @ 2023-03-17 18:48 卡卡罗特kk 阅读(27) 评论(0) 推荐(0)