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 Local Development Environments Advanced Tooling Code Generation

For the Generation of the Constructor, how do you select both of the member variables to be set simultaneously?

I am only able to do one variable at a time. This creates two Constructors overall.

3 Answers

I am not sure I fully understand you. Why don't you just set the second variable on a new line, after the first one? In the same scope, in the same constructor.

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Hmmm.... Do you mean you are creating it using code generation and it is only choosing one?

There are checkboxes next to the options, choose them both.

That help?

Yes, I apologize for the confusion in my wording. It is quite a weird problem. There were no check boxes and you seemed to just click them both and they were both highlighted. This was not the case for me as it would only let me highlight one.

Jonathan Leon
Jonathan Leon
18,813 Points

I encountered this too and for anyone having a difficulty, just hold ctrl button (I'm on Windows) and it will work :)

if that doesn't work anymore try the shift button and try to highlight the selections you needed. I am on windows as well and ctrl didn't work for mine, shift did