Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Build a JavaFX Application Build a Pomodoro App The Model

Juneau Lim
Juneau Lim
13,362 Points

change constructor argument prefix

I think I saw it before but just can't find it in treehouse & google. I feel like my search is still not good enough.

so when using auto constructor, Mine:

    public Attempt(String mMessage, AttemptKind mKind) {
        this.mMessage = mMessage;
        this.mKind = mKind;
    }

video:

    public Attempt(String message, AttemptKind kind) {
        mMessage = message;
        mKind = kind;
    }

Please help me find the setting.

1 Answer

Tonnie Fanadez
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 Points

Hi Juneau Lim

Open File -> Settings Expand Editor and then expand Code Style. Select Java, then choose the Code Generation tab. In the Naming table, select the Field row and add m as the name prefix for fields

Hope this helps, Thanks,

Juneau Lim
Juneau Lim
13,362 Points

Thank you so much. You saved my day. I certainly remember I did this before. Have no idea why it was so hard to find.

Many thanks,