当前位置:网站首页>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;
}
}
边栏推荐
- leetcode:1648. 销售价值减少的颜色球【二分找边界】
- Key Points Estimation and Point Instance
- High dimensional Gaussian distribution basics
- VPGNet
- VPGNet
- pycaret源码分析:下载数据集\Lib\site-packages\pycaret\datasets.py
- 谷歌『云开发者速查表』;清华3D人体数据集;商汤『通用视觉框架』公开课;Web3极简入门指南;高效深度学习免费书;前沿论文 | ShowMeAI资讯日报
- 高维高斯分布基础
- OSF understands the agile development model in one minute
- RTL8762DK WDG (six)
猜你喜欢

两院院士直言:不要迷信院士

Classes and Objects: Above

Key Points Estimation and Point Instance

Super like the keyboard made from zero, IT people love it

北京突然宣布,元宇宙重大消息

自动化机器学习pycaret: PyCaret Basic Auto Classification LightGBM

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

蓝图:杨辉三角排列

Introduction to the five data types of Redis

Daily practice of LeetCode - Circular linked list question (interview four consecutive questions)
随机推荐
如何编辑epub电子书的目录
Compose principle - the view and the principle of two-way data binding
WindowInsetsControllerCompat is simple to use
RTL8762DK WDG (six)
Redis五种数据类型简介
Web API Introduction and Types
两院院士直言:不要迷信院士
Matlab/Arcgis processing nc data
Chinese version of Pylint inspection rules
VPGNet
【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
设计消息队列存储消息数据的MySQL表格
自动化机器学习pycaret: PyCaret Basic Auto Classification LightGBM
声称AI存在意识,谷歌工程师遭解雇:违反保密协议
Beijing suddenly announced that yuan universe big news
MYSQL transactions
Rainbow share | how to use moving targets defense technology to guard against the unknown
RTL8762DK Lighting/LED (3)
how to edit the table of contents of an epub ebook
WebApi 打个Attribute 统一处理异常