当前位置:网站首页>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;
}
}
边栏推荐
- OSF一分钟了解敏捷开发模式
- Game Security 03: A Simple Explanation of Buffer Overflow Attacks
- MYSQL逻辑架构
- MYSQL Index Analysis
- Web3.0:构建 NFT 市场(一)
- Southern University of Science and Technology: Xiaoying Tang | AADG: Automatic Enhancement for Generalization in the Field of Retinal Image Segmentation
- 修改Postman安装路径
- Super like the keyboard made from zero, IT people love it
- MYSQL Keyword Explain Analysis
- how to edit the table of contents of an epub ebook
猜你喜欢

从零造键盘的键盘超级喜欢,IT人最爱

Introduction to machine learning how to?

MVCC总结

ECCV2022 Workshop | 复杂环境中的多目标跟踪和分割

LeetCode每日一练 —— 环形链表问题(面试四连问)

Euler system (euleros): upgrade Mysql

SC7A20(士兰微-加速度传感器)示例

设备树——dtb格式到struct device node结构体的转换

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

MYSQL-批量插入数据
随机推荐
微信小程序之小程序页面语法
js 实现复制功能
cmake入门学习笔记
RTL8762DK PWM(七)
OSF一分钟了解敏捷开发模式
MYSQL索引解析
Inheritance Considerations
考研备考方案
WeChat applet page syntax
leetcode:1562. 查找大小为 M 的最新分组【模拟 + 端点记录 + 范围合并】
软考高级系统架构设计师系列之:信息系统基础知识
gateway gateway cross domain
An open source and easy-to-use flowchart drawing tool drawio
Modern Enterprise Architecture Framework 1
Academicians of the two academies speak bluntly: Don't be superstitious about academicians
Key Points Estimation and Point Instance
Southern University of Science and Technology: Xiaoying Tang | AADG: Automatic Enhancement for Generalization in the Field of Retinal Image Segmentation
You need to know the TCP wave four times
Introduction to machine learning how to?
七月集训(第31天) —— 状态压缩