当前位置:网站首页>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;
}
}
边栏推荐
猜你喜欢

pycaret源码分析:下载数据集\Lib\site-packages\pycaret\datasets.py

RTL8762DK 点灯/LED(三)

Classes and Objects: Above

Automated machine learning pycaret: PyCaret Basic Auto Classification LightGBM

JVM面试题总结(持续更新中)

RTL8762DK UART (two)

Team of Professor Chen Jianyu of Tsinghua University | Contact Safety Reinforcement Learning Framework Based on Contact-rich Robot Operation

Notes on how to use zeno

Summary of MVCC

Google "Cloud Developer Quick Checklist"; Tsinghua 3D Human Body Dataset; SenseTime "Universal Vision Framework" open class; Web3 Minimalist Getting Started Guide; Free Books for Efficient Deep Learni
随机推荐
Luogu P3373: 线段树
What practical projects can machine learning beginners learn?
Rainbow share | how to use moving targets defense technology to guard against the unknown
JVM面试题总结(持续更新中)
Team of Professor Chen Jianyu of Tsinghua University | Contact Safety Reinforcement Learning Framework Based on Contact-rich Robot Operation
Modern Enterprise Architecture Framework 1
By Value or By Reference
MYSQL Index Analysis
WeChat applet page syntax
RTL8762DK RTC (5)
精心总结十三条建议,帮你创建更合适的MySQL索引
Google engineer fired for claiming AI awareness: breach of nondisclosure agreement
Unity3D学习笔记10——纹理数组
500 miles
C string array reverse
STK8321 I2C(昇佳-加速度传感器)示例
WindowInsetsControllerCompat is simple to use
MYSQL-批量插入数据
Classes and Objects: Medium
GDB 源码分析系列文章五:动态库延迟断点实现机制