Excessive comment, whops

This commit is contained in:
Siwat Sirichai 2020-10-22 16:50:05 +07:00
parent 10a3a6fb3a
commit a638a4a409
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ public class Replace {
return; //If a is a null pointer, return immediately to prevent a NullPointerException
}
//NOTE: return; (a return statement without a return value) in a method with no return type will break out of the method.
for(int i = 0;i<a.length;i++)System.out.format("%d%s",a[i],i==a.length-1?"\n":","); //Loop from i to a.length use a ternary operator to determine if value printed is the last one, if it is, create a new line , if not, insert a comma (')for(int i = 0;i<a.length;i++)System.out.format("%d%s",a[i],i==a.length-1?"\n":","); //Loop from i to a.length use a ternary operator to determine if value printed is the last one, if it is, create a new line , if not, insert a comma (')
for(int i = 0;i<a.length;i++)System.out.format("%d%s",a[i],i==a.length-1?"\n":","); //Loop from i to a.length use a ternary operator to determine if value printed is the last one, if it is, create a new line , if not, insert a comma (')
}
public static void main(String[] args) {