Q:

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

I have simple class:
public class A {
    private int a;
    private int b;

    public A(int a) {
        this.a = a;

    }
}

And now I want to add int b то constructors arguments and initialize class field with new argument . So it, finally, must be:
public A(int a, int b) {
    this.a = a;
    this.b = b;
}

So, if IDEA (AndroidStudio) have shortCut for it?

P.S. Same question for Eclipse: Shortcut for adding fields to existing constructor

A:

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

