当前位置:网站首页>IDEA调试
IDEA调试
2022-08-01 01:17:00 【Apple-yeran】
IDEA是Java常用的开发工具,这里记录一下IDEA调试相关操作。
1 调试界面各按钮的含义
2 调试过程中修改变量的值
3 快速定位bug
4 实战
可以通过下面的代码实际操作操作,以便更好地掌握。
public class DebugDemo1 {
public static void main(String[] args) {
f1();
f2();
}
private static void f2() {
for (char c = 0; c < 128; c++) {
if (Character.isLowerCase(c)) {
System.out.println(c);
}
}
}
private static void f1() {
System.out.println("one");
System.out.println("two");
System.out.println("three");
System.out.println("four");
System.out.println("five");
}
}
/* 1. 给出 exR1(6) 的返回值: public static String exR1(int n) { if(n <= 0) return ""; return exR1(n-3) + n + exR1(n-2) + n; } 2. 给出 exR2(6) 的返回值: public static String exR2(int n) { String s = exR2(n-3) + n + exR2(n-2) + n; if(n <= 0) return ""; return s; } */
public class DebugDemo2 {
public static void main(String[] args) {
System.out.println(exR1(6)); // 311361142246
// System.out.println(exR2(6)); // StackOverflowError
}
public static String exR1(int n) {
if(n <= 0) return "";
return exR1(n-3) + n + exR1(n-2) + n;
}
public static String exR2(int n) {
String s = exR2(n-3) + n + exR2(n-2) + n;
if(n <= 0) return "";
return s;
}
}
边栏推荐
猜你喜欢
Data Middle Office Construction (VII): Data Asset Management
STK8321 I2C (Shengjia-accelerometer) example
声称AI存在意识,谷歌工程师遭解雇:违反保密协议
Southern University of Science and Technology: Xiaoying Tang | AADG: Automatic Enhancement for Generalization in the Field of Retinal Image Segmentation
元宇宙改变人类工作模式的四种方式
MYSQL Index Analysis
MYSQL查询截取优化分析
RTL8762DK 点灯/LED(三)
RTL8762DK UART(二)
MYSQL经典面试题
随机推荐
Detailed explanation of TCP protocol
RTL8762DK Lighting/LED (3)
Force buckle 2326, 197
Redis五种数据类型简介
OSD读取SAP CRM One Order应用日志的优化方式
Qlib quantitative source analysis: qlib/qlib/contrib/model/GBDT py
RTL8762DK UART(二)
Unity3D study notes 10 - texture array
RTL8762DK WDG (six)
High dimensional Gaussian distribution basics
[Microservice] Distributed Transaction Solution - Seata
机器学习应该如何入门?
The principle of virtual inheritance
pycaret源码分析:下载数据集\Lib\site-packages\pycaret\datasets.py
Chinese version of Pylint inspection rules
元宇宙改变人类工作模式的四种方式
Item 36: Specify std::launch::async if asynchronicity is essential.
考研备考方案
Summary of JVM interview questions (continuously updated)
Unity3D学习笔记10——纹理数组