In this example, we discuss how Quick Fix is extremely powerful. It can be activated by pressing ctrl+1.Whenever Eclipse detects a problem, it will underline the problematic text in the editor. Select the underlined text and press Ctrl+1to invoke Quick Fix to see proposals how to solve this problem.
For example type myBoolean = true; If myBoolean is not yet defined, Eclipse will highlight it as an error. Select the variable and press Ctrl+1, Eclipse will suggest creating a field or local variable.

How to use Quick Fix in Eclipse?-quick-fix.jpg
Figures: Invoking Quick Fix to solve problem

It allows creating new local variables and fields as well as new methods and new classes. Or it can put try-catch statements around your exceptions