Of course, as with ordinary language, conventions may change depending on where a language is used. What would it be like for someone who needs to check in a fix in just one method, but finds the whole file changed due to differences in spaces and tabs? Imagine the utter nightmare that version control would become if indentation was inconsistent, some people using tabs and other people using spaces. The rules for Java code are given in the document Code Conventions for the Java Programming Language.Ĭoding conventions can also regulate smaller details, such as indentation. And in Java, starting a method's name with a capital letter is a gross violation of coding conventions. For example, in polite society, wRiTiNg LiKe ThIs would be considered bad manners. As with any language, some formatting conventions have been adopted in programming. But you too should understand it as you learn about the Java language. And this resource showed you code that the computer understands. When you started learning a programming language, you looked at books or some educational resource like CodeGym. But you can't have a personal conversation with a computer. The only difference is that it is a special language whose main purpose is to facilitate communication with a computer in order to explain to the computer what we want it to do. A programming language is very similar to a spoken language.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |