If you search for a String in Netbeans Java editor, it automatically highlights all occurrences of that string.
But, how can I achieve this feature in Eclipse?
You can enable "Toggle Mark Occurrences" (shortkey is ALT+SHIFT+O).
For the color of the select text,you can:
Window->Preferences->General->Editors->Text Editors->Annotations->Occurrences
Hope it useful.