What do the icons for methods in Eclipse mean? [du

2019-03-11 14:36发布

Possible Duplicate:
What do the icons in Eclipse mean?

In the "Package Explorer" in the Eclipse IDE, I can click on a Java class and list all its methods. The methods are displayed with a few different icons before the name, including a green circle or a red square.

What do these icons mean? Is there a webpage that explains them?

3条回答
smile是对你的礼貌
2楼-- · 2019-03-11 15:03

green circle - Usually a public method. red square - private method. yellow - protected

查看更多
Melony?
3楼-- · 2019-03-11 15:10

green circleGreen circle indicates a public method

red squareRed square indicates a private method

alt textYellow diamond indicates a protected method

alt textBlue triangle indicates default (package visible) method

This page gives an overview of all the icons used in Eclipse JDT. This page explains what the different access levels mean in Java terms, in case you aren't familiar with that.

查看更多
霸刀☆藐视天下
4楼-- · 2019-03-11 15:16

Methods with the red square are private and the ones with the green circle are public.

http://download.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html

查看更多
登录 后发表回答