Why er write like this "class MyClass" | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Why er write like this "class MyClass"

why can't we simply write class myclass!

9th Jan 2017, 8:09 AM
Saurabh Thakur
Saurabh Thakur - avatar
2 Answers
+ 4
You can if you want... it's work ^^ But it's a useful convention for having a good readable code, where you can differenciate easily different type of variables. Using the common convention allow to aquire the same reflexes than everybody, and avoid being confused by others writing style ;)
9th Jan 2017, 9:23 AM
visph - avatar
+ 2
also capitalizing allows the ide to change the color of the class name to make finding instances of it easier when you make changes. just like indenting, it is there to make it easier to edit after you walk away for 6 months & come back to it
9th Jan 2017, 10:20 AM
David Price
David Price - avatar