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 trialJuneau Lim
13,362 Pointschange 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
UX Design Techdegree Graduate 22,796 PointsHi 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
13,362 PointsJuneau Lim
13,362 PointsThank 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,
Edward Strudwick
2,036 PointsEdward Strudwick
2,036 PointsThanks!