From ggc
|
01 packagepackage is used to name the directory or folder a class is in intermediate;
02
03 importimport means to make the classes and/or packages available in this program java.util.*;
04
05 /**
06 * All about my helper classclass is a group of fields and methods used for making objects.
07 * @authorthis is the Javadoc tag for documenting who created the source code My Name Here
08 */
09 publicpublic is used to indicate unrestricted access (any other class can have access) classclass is a group of fields and methods used for making objects ReverseComparator implementsimplements means providing method bodies for the methods declared in the corresponding interface Comparator<String>
10 {open braces start code blocks and must be matched with a close brace
11 publicpublic is used to indicate unrestricted access (any other class can have access) intint is the type for whole numbers and it is short for integer compare(String a, String b)
12 {open braces start code blocks and must be matched with a close brace
13 returnreturn means to provide the result of the method and/or cease execution of the method immediately b.compareTo(a);
14 }close braces end code blocks and must match an earlier open brace
15 }close braces end code blocks and must match an earlier open brace
|
Download/View intermediate/ReverseComparator.java