Use Quick Fix to create local variables, fields and methods

To create a local variable, a field or a method, just assume it already exists and use it like you would if it already existed. This will yield a compiler error. Press Ctrl + 1 (Quick Fix) to automatically fix this error. This will create the missing code:

Ralf Ebert

Ralf Ebert is an independent software developer, technical writer and trainer. He makes apps for Mac OS X and iOS and builds software solutions for companies using Eclipse RCP and Ruby on Rails. He offers training courses for software developers and writes books and articles about software development.