views:

55

answers:

3

In the "Package Explorer" in Eclipse, I can click on a Java class and list all the methods for it. The methods are shown with a few different symbols before the name. This symbol can be a green circle or a red square. What does this symbols mean? Is there a webpage that explains them?

+4  A: 

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.

mikej
there is one more for package-private, right? Blue triangle?
Thilo
@Jonas I spotted the link I'd included was actually the page for C++ outline view within Eclipse - that's why I took it out. I've added the right page for Java now.
mikej
@Thilo thanks I've added that one too.
mikej
+1 for the embedded icons :-)
tsimbalar
A: 

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

Spike Gronim
A: 

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

Protostome