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

Why does Craig no longer use camelCase for "IllegalArgumentException" ?

This is a small question about writing formality, but is there any reason why Craig no longer uses camelCase for "IllegalArgumentException" when writing the throw new block? Happens at 1:40 in Java Objects: Exceptions.

1 Answer

Hi Joshua - IllegalArgumentException is a class, and the convention for class names is to start with a capital letter. It helps to differentiate class names from variable and method names, which use lowerCamelCase.

Aw yes, that is right. I had forgotten that it was a class, not a method or variable. Thank you!