From the course: Java Refactoring Best Practices
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Using spacing, brackets, and comments effectively - Java Tutorial
From the course: Java Refactoring Best Practices
Using spacing, brackets, and comments effectively
- [Instructor] In this video, we'll be dealing with spacing, brackets, and comments. First important thing about spacing is formatting conventions, and there's a thing or two I need to tell you about them. First of all, indent. I sometimes come across people that will tell me it's not important, it's not Python. I know it's not Python, but even though it works with poor use of indents, I simply cannot read it as easily, let alone debug it. Do we have all the closing brackets here? Well, I don't know and my brain doesn't want to process it either. We probably do because I don't see any red squigglies. But if I were asked do we have all the closing brackets here? Yes, it turns out we do. And I can see it with just one short look. And then the issue with where to put spaces. The general opinion is to put spaces around the equal sign but not between parentheses and the content that goes in between parentheses. So the top…
Contents
-
-
-
-
Java style guide1m 22s
-
(Locked)
Java naming conventions2m 58s
-
(Locked)
Using spacing, brackets, and comments effectively3m 47s
-
(Locked)
Writing clean and maintainable Java classes5m 43s
-
(Locked)
Best practices for writing clear and concise methods5m 32s
-
(Locked)
Challenge: Applying basic best practices1m 13s
-
(Locked)
Solution: Applying basic best practices54s
-
-
-
-