eclipse中的错误突出只是部分工作 [英] error highlight in eclipse only partially works

查看:118
本文介绍了eclipse中的错误突出只是部分工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在Eclipse中写这样的东西

If I write something like this in Eclipse

UnexistentClass foo = new UnexistentClass();
foo.unexistenMethod();

第一行突出显示为错误(该类不存在),但第二行为突出显示,即使我正在调用属于不存在的类的对象上不存在的方法,也是...

first line is highlighted as an error (the class does not exists), but second line is not highlighted, even if I'm calling a method which does not exists on an object which belongs to a class which does not exists, too...

为什么是sthat?

感谢

推荐答案

不存在,所以eclipse在那时给出错误。
之后,它确认该类,但它没有关于该类的属性和行为的信息,因此它将忽略。

The class is not existed so eclipse gives error at that point. After that it assuems that class but it does not have information about properties and behaviors of that class so it ignores.

这篇关于eclipse中的错误突出只是部分工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆