eclipse操作(一)

1、如何在eclipse里查看一个接口的所有实现类?
答: 首先选中接口类型名字,右键菜单,选择 open type hierarchy 或者 光标放在接口名上,ctrl + T

2、如何查看一个类及其父类中的所有方法和属性
答: Ctrl + o 后,显示当前类的字段和方法;再按一次,同时显示父类的字段和方法,蓝色字为父类属性

3、 eclipse 中debug小窗口的按钮”Show Breakpoints Supported by Selected Target”功能作用?
答: 目前主要是用来区分是java断点还是c/c++断点.
Currently, when pressing this button the breakpoints view will only show breakpoints that are of the same type
as the debug session. For example, if debugging Java, only Java breakpoints will be shown, and if debugging
C/C++ only C/C++ breakpoints will be shown.

We want to make this behavior more selective and only show breakpoints that are actually applicable
to the current debug session. If you are debugging one C/C++ application, you would no longer be bothered
with the breakpoints set in the code of an another C/C++ application.
We propose to make this new behavior the default for CDT, but to have a new preference to allow users
or vendors to select the old behavior.

4、 eclipse中开启assert断言
选择Install JREs -> 选择相关版本 -> 点击edit -> 在Default VM arguments 里面输入 -ea 即可

java assert 包括两种表达式,分别如下

// expression1表示一个boolean表达式,expression2表示一个基本类型、表达式或者是一个Object,用于在失败时输出错误信息
assert expression1;
assert expression1: expression2;

public class Test1 {
    public static void main(String[] args) {
        int i = 10;
        assert i == 9 : "i == 9 is false";
    }
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值