当前位置:网站首页>IDEA debugging
IDEA debugging
2022-08-01 01:19: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;
}
}
边栏推荐
猜你喜欢
STK8321 I2C(昇佳-加速度传感器)示例
Carefully summarize thirteen suggestions to help you create more suitable MySQL indexes
[AMEX] LGBM Optuna American Express Credit Card Fraud Contest kaggle
RTL8762DK RTC (5)
MYSQL query interception optimization analysis
TCP协议详解
SC7A20(士兰微-加速度传感器)示例
RTL8762DK uses DebugAnalyzer (four)
STK8321 I2C (Shengjia-accelerometer) example
WeChat applet page syntax
随机推荐
ECCV2022 Workshop | Multi-Object Tracking and Segmentation in Complex Environments
RTL8762DK PWM (seven)
Unity3D学习笔记10——纹理数组
Js replication
Modern Enterprise Architecture Framework 1
YOLO怎么入门?怎么实现自己的训练集?
Classes and Objects: Medium
how to edit the table of contents of an epub ebook
leetcode:1648. 销售价值减少的颜色球【二分找边界】
Academicians of the two academies speak bluntly: Don't be superstitious about academicians
MYSQL transactions
Introduction to the five data types of Redis
内核的解压缩过程详解
Chain programming, packages, access
IDEA调试
Super like the keyboard made from zero, IT people love it
MYSQL Keyword Explain Analysis
Beijing suddenly announced that yuan universe big news
如何编辑epub电子书的目录
RTL8762DK 使用DebugAnalyzer(四)