Java suppresses several features (such as operator overloading and multiple inheritance) for classes in order to simplify the language and to prevent possible errors and anti-pattern design.
Java uses the same commenting methods as C++. There are two different methods of commenting, the first is generally used for single line comments // two forward slashes and the second is generally used for multiple line commenting, this requires an open and close. In order to use the second method of commenting you must use the forward slash asterisk (/*) and it must end with an asterisk forward slash (*/)
//This is an example of a single line comment using two forward slashes
/* This is an example of a multiple line comment using the forward slash
and asterisk. This type of comment can be used to hold a lot of information
but it is very important to remember to close the comment. */
No comments:
Post a Comment