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 Introducing the Project

Brendan Whiting
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Brendan Whiting
Front End Web Development Techdegree Graduate 84,735 Points

Is this Google Java Style Guide for all my projects?

Since adding these Google Java Style Guide preferences in this workshop, I've discovered it's also applying these preferences to other projects. Is the intention here that I should be implementing this on all projects? What are people's opinions on this style guide?

3 Answers

Roman Mayer
Roman Mayer
10,925 Points

I'm going to change it back. I prefer my own style :) 4 spaces = 1 tab , duuuude! ;)

Jeremiah Shore
Jeremiah Shore
31,168 Points

Make sure you didn't check the checkbox next to "current scheme" on the Import Scheme (from/to) form during the import process. If you did, then you may have overwritten the default scheme. I'm sure if you look on IntelliJ's website you can find it again though.

When you're done you should have another entry in the Scheme dropdown at the top of the preferences/settings page for Editor > Code Style > Java. In the video, his IDE switches over automatically, but on my machine I had to choose the new scheme from the dropdown.

It's very widely used. It's like Airbnb's style guide for JavaScript, the PSR2 for PHP, or PEP8 for Python.

I also use Checkstyle to lint my code against the Google Style Guide.