For certain problems underlined with a problem highlight line, the Java editor can offer corrections. This is shown by the light bulb shown in the editor marker bar.
Quick fix is also available on a problem entry in the Problem view. The Quick Fix action will open a dialog to select the correction.
Note that the light bulb is only a hint. It is possible that even with the light bulb shown, it turns out that no corrections can be offered.
A overview of quick fixes available in the Java editor can be found here.
Quick Assists are proposals available even if there is no problem or warning. See the Quick Assist page for more information.
Quick Fix
Quick Assist
Java editor