Updated : January 11, 2010 9:24 AM
Count and ONLY output the file or directory names.
Input file : publicA.txt
Sample output
public int indexOf ( String str) Returns the index within this string of the first occurrence of the specified substring. The integer returned is the smallest value k such that: this.startsWith(str, k ) is true . Parameters: str - any string. Returns: if the string argument occurs as a substring within this object, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
public int indexOf ( String str)
Returns the index within this string of the first occurrence of the specified substring. The integer returned is the smallest value k such that: this.startsWith(str, k ) is true .
Parameters: str - any string.
Returns: if the string argument occurs as a substring within this object, then the index of the first character of the first such substring is returned; if it does not occur as a substring, -1 is returned.
Public String substring (int beginIndex) Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string. Examples: "unhappy".substring(2) returns "happy" "Harbison".substring(3) returns "bison" "emptiness".substring(9) returns "" (an empty string) Parameters: beginIndex - the beginning index, inclusive. Returns: the specified substring. Throws: IndexOutOfBoundsException - if beginIndex is negative or larger than the length of this String object.
Public String substring (int beginIndex) Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string.
Examples: "unhappy".substring(2) returns "happy" "Harbison".substring(3) returns "bison" "emptiness".substring(9) returns "" (an empty string)
Parameters: beginIndex - the beginning index, inclusive.
Returns: the specified substring.
Throws: IndexOutOfBoundsException - if beginIndex is negative or larger than the length of this String object.
H K N O P Sh Sm W L Not Listed
Last Name :
Email :
Select one of the following that describes when and why you are filling out this form: This assignment is in on time. This assignment is in on time, being resubmitted due to a failed submission (I have a copy of the original submission). This assignment is a corrected submission for half the missed credit. This assignment is one day late and will lose 15%. This assignment is more than one day late (half credit at best). This assignment is late because of an EXCUSED absence. This assignment is being resubmitted at the request of the teacher.
main method code
How many lines did you output?
Updated: Monday, January 11, 2010 9:24 AM