Reputation: 141
Suppose you have a method which returning some object. So, when you hover over that method used in some other class, eclipse show you a popup with the description about that method signature and what that method would return.
But, my question is there is a little symbol ahead of what is being return. On different occasion you got different shape and color symbol.
I have a screen shots of that:
1) Green circle shape symbol
2) Red square shape symbol
3) Yellow diamond shape symbol
So,
Upvotes: 4
Views: 6091
Reputation: 1409
The symbols next to the methods refer to the access modifiers
What is the significance of that little symbol?
Green circle is public
Red square means private
Yellow diamond is protected
Blue triangle means default(package) access
Does that symbol give us any idea about the method?
Yes, it tells us where it can be accessed from.
For more on access modifiers: http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html
Upvotes: 9
Reputation: 2690
That are the same symbols as you see all over the IDE. Which present the visibility of the element inside your app.
The visibility of an element in a java application can be:
Upvotes: 1
Reputation: 265
Red square means the method is private. Yellow diamond means the method is protected. Green circle means the method is public.
Upvotes: 3