当前位置:网站首页>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;
}
}
边栏推荐
- 微信小程序之小程序页面语法
- Item 36: Specify std::launch::async if asynchronicity is essential.
- GDB source code analysis series of articles five: dynamic library delay breakpoint implementation mechanism
- Beijing suddenly announced that yuan universe big news
- WindowInsetsControllerCompat is simple to use
- MYSQL逻辑架构
- 欧拉系统(euleros):升级Mysql
- Rasa 3.x Study Series - Rasa - Issues 4898 Study Notes
- Unity3D学习笔记10——纹理数组
- MYSQL-Batch insert data
猜你喜欢

RTL8762DK WDG (six)

Google engineer fired for claiming AI awareness: breach of nondisclosure agreement

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

how to edit the table of contents of an epub ebook

如何编辑epub电子书的目录

MYSQL主从复制

MYSQL master-slave replication

ROS2系列知识(4): 理解【服务】的概念

蓝图:杨辉三角排列

Basic implementation of vector
随机推荐
Nmap Operation Manual - Full Version
Web3.0: Building an NFT Market (1)
Academicians of the two academies speak bluntly: Don't be superstitious about academicians
Super like the keyboard made from zero, IT people love it
Matlab/ArcGIS processing GPM global monthly precipitation data
现代企业架构框架1
What practical projects can machine learning beginners learn?
RTL8762DK uses DebugAnalyzer (four)
ROS2 series of knowledge (4): understand the concept of [service]
MYSQL Classic Interview Questions
cmake入门学习笔记
The principle of virtual inheritance
网关gateway跨域
OSD read SAP CRM One Order application log way of optimization
Chinese version of Pylint inspection rules
MYSQL Keyword Explain Analysis
RTL8762DK RTC(五)
Web API 介绍和类型
MYSQL索引解析
MYSQL关键字Explain解析