ShortCut for adding class field to existing constructor in AndroidStudio or IDEA ShortCut for adding class field to existing constructor in AndroidStudio or IDEA android android

ShortCut for adding class field to existing constructor in AndroidStudio or IDEA


  1. Make sure, that field, you want to add to constructor is private
  2. Select it's name with mouse
  3. Press Alt+Enter
  4. Choose add constructor parametr


Ok Then you can do this to change .

  1. Select the Constructor.
  2. Right click inside Editor.
  3. Click on Refactor.
  4. Click on Change Signature and you will see this

enter image description here

Once you are there you can add or remove parameters and add new signature, rename , etc..,