当前位置:网站首页>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;
}
}
边栏推荐
- Introduction to the five data types of Redis
- Modern Enterprise Architecture Framework 1
- how to edit the table of contents of an epub ebook
- 【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
- What practical projects can machine learning beginners learn?
- Super like the keyboard made from zero, IT people love it
- Data Middle Office Construction (VII): Data Asset Management
- Web3.0:构建 NFT 市场(一)
- Team of Professor Chen Jianyu of Tsinghua University | Contact Safety Reinforcement Learning Framework Based on Contact-rich Robot Operation
- 微信小程序之小程序页面语法
猜你喜欢
Google Earth Engine - Error resolution of Error: Image.clipToBoundsAndScale, argument 'input': Invalid type
Summary of MVCC
MYSQL经典面试题
Key Points Estimation and Point Instance
数据中台建设(七):数据资产管理
how to edit the table of contents of an epub ebook
Modern Enterprise Architecture Framework 1
Daily practice of LeetCode - Circular linked list question (interview four consecutive questions)
STK8321 I2C (Shengjia-accelerometer) example
如何编辑epub电子书的目录
随机推荐
MYSQL two-phase commit
从零造键盘的键盘超级喜欢,IT人最爱
设备树——dtb格式到struct device node结构体的转换
[Microservice] Distributed Transaction Solution - Seata
MYSQL事务
RTL8762DK uses DebugAnalyzer (four)
VPGNet
MYSQL Classic Interview Questions
Item 36: Specify std::launch::async if asynchronicity is essential.
VPGNet
Summary of JVM interview questions (continuously updated)
RTL8762DK UART(二)
IDEA修改注释字体
MYSQL Index Analysis
Introduction to machine learning how to?
【元胞自动机】基于matlab界面聚合元胞自动机模拟【含Matlab源码 2004期】
Handwritten binary search tree and test
GDB 源码分析系列文章五:动态库延迟断点实现机制
Euler system (euleros): upgrade Mysql
声称AI存在意识,谷歌工程师遭解雇:违反保密协议