June 2018
Beginner
722 pages
18h 47m
English
The Java Specification provides the following information about comments:
Here is an example of comments in the SimpleMath class that we have written already:
public class SimpleMath { /* This method just multiplies any integer by 2 and returns the result */ public int multiplyByTwo(int i){ //Should we check if i is bigger than 1/2 of Integer.MAX_VALUE ? return i * 2; // The magic happens here }}
The comments do not affect the code in any way. ...
Read now
Unlock full access