随笔分类 -  基础

摘要:for (int i = 0; i < row; i++) { Arrays.fill(isVisited[i], false); } 阅读全文
posted @ 2023-09-14 10:17 爱新觉罗LQ 阅读(14) 评论(0) 推荐(0) 编辑
摘要:拿到矩形的外圈 for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { if (i == 0 || i == row - 1 || j == 0 || j == col - 1) { if (board[i][j] == 'O' 阅读全文
posted @ 2023-09-14 09:49 爱新觉罗LQ 阅读(3) 评论(0) 推荐(0) 编辑
摘要:BigInteger 我们使用BigInteger类的构造函数将字符串str转换为对应的大整数。BigInteger类可以处理任意位数的整数,无论数字有多大。 常用方法: 1. 构造方法 BigInteger(String val); // 使用字符串创建BigInteger对象。 2. 基本操作方 阅读全文
posted @ 2023-09-13 16:29 爱新觉罗LQ 阅读(47) 评论(0) 推荐(0) 编辑
摘要:ACM二维数组的读取 输入 5 5 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 1 0 读取 Scanner in = new Scanner(System.in); int row = in.nextInt(); int col = in.nextI 阅读全文
posted @ 2023-09-09 11:04 爱新觉罗LQ 阅读(98) 评论(0) 推荐(0) 编辑
摘要:# 正则表达式匹配引号 ## 1. 单引号 ```java String regex = "'"; ``` ## 2. 双引号 反斜杠(\)用于转义双引号字符,以确保它被正则表达式引擎正确解析。 ```java String s = new StringBuilder(in.nextLine()). 阅读全文
posted @ 2023-09-07 12:10 爱新觉罗LQ 阅读(1311) 评论(0) 推荐(0) 编辑
摘要:# List删除指定区域的元素 ```bash The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice- 阅读全文
posted @ 2023-09-05 15:07 爱新觉罗LQ 阅读(21) 评论(0) 推荐(0) 编辑
摘要:# 1. 区分大小写 ```java str1.compareTo(str2) ``` ## 2. 不区分大小写 ```java str1.compareToIgnoreCase(str2) ``` 阅读全文
posted @ 2023-09-05 11:35 爱新觉罗LQ 阅读(9) 评论(0) 推荐(0) 编辑
摘要:![](https://img2023.cnblogs.com/blog/2171496/202309/2171496-20230904124423915-1915833590.png) 举例子 ```java Integer num1 = 10; Integer num2 = 10; System 阅读全文
posted @ 2023-09-04 12:50 爱新觉罗LQ 阅读(5) 评论(0) 推荐(0) 编辑
摘要:```java int weight = (int) Math.ceil(arr[i - 1] / 512.0); // 向上取整 ``` 阅读全文
posted @ 2023-08-30 17:34 爱新觉罗LQ 阅读(72) 评论(0) 推荐(0) 编辑
摘要:1. Java 的浮点运算是基于 IEEE-754 标准来的。 IEEE-754 standard Java's Floating-Point Operations 2. Java 语言规范 https://docs.oracle.com/javase/specs/jls/se7/html/jls- 阅读全文
posted @ 2023-03-31 12:24 爱新觉罗LQ 阅读(149) 评论(0) 推荐(0) 编辑
摘要:Java是不能直接在类中对变量进行赋值的 错误案例 只能在定义的时候赋值 或者在方法中赋值,或者在代码块中赋值 public class uuq { public static void main(String[] args) { c c = new c(); c.update(3); System 阅读全文
posted @ 2023-03-30 13:11 爱新觉罗LQ 阅读(319) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示