Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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