Haha... Im pro java...
The Chapters: The List Of String Methods- 1 - charAt(int)
- 2 - indexOf(String)
- 3 - indexOf(String, int)
- 4 - lastIndexOf(string)
- 5 - lastIndexOf(string, int)
- 6 - length()
- 7 - String To Double/Int
- 8 - String Concatination
- 9 - toLowerCase()
- 10 - toUpperCase()
- 11 - trim()
- 12 - compareTo(string, string)
- 13 - equals(string, string)
Chapter One: Using charAt(int)The charAt(int) can be used in various instances... like when you are expecting the user to be a complet dunce, or, imperfect. charAt(int) reads a single "Char" data type at the indicated location inside the parenthese.
EXAMPLE:
This is a simple program that takes a string and returns the first char.
public char kunk()
{
String kunk = "awesome";
char rocks = kunk.charAt(0);
return rocks;
}
The first char in a string gets 0, the second 1, the third 2, and so on...
Chapter Two: Using indexOf(String)IndexOf(String) is mostly used for searching a string for a certain word, phrase or single letter. It searches the entire string until it finds one then stops. It then returns the number that the occurance happened...
EXAMPLE:
public int hardcore()
{
String kunk = "I rock harder than j00";
int lol = kunk.indexOf("I");
return lol;
}
The return output of such a coding would be 0, because the first uppercase i was in the FIRST position of the string, kunk, refer to chapter one for the reason why it returns 0 instead of 1.
Chapter Three: Using indexOf(String, int)indexOf(String, int) is more specific. The int that you input into indexOf(String, int) is the determining factor of what it will find. This one is a lot more complicated to use. The int puts a restricton on what parts of the string it will search. For instance... if you put a 3 in the int space as such...
String kunk = "lol bitch";
kunk.indexOf("lol", 3)
... It would find nothing and be enable to return anything due to your current restrictions. But by using the one in chapter two or changing String kunk to...
String kunk = "bitch lol";
kunk.indexOf("lol", 3)
... It would return 7, because it was able to find lol within the set restrictions
Chapter Four: Using lastIndexOf(String)This is the exact same concept of Chapter two, but it scans the entire string for it and returns the LAST one it finds, it also returns an int.
EXAMPLE:
public int kunk()
{
String kunk = "lol kunk lol";
int lol = kunk.lastIndexOf("l");
return lol;
}
It returns the LAST l in the String so it would return 11.
Chapter Five: Using lastIndexOf(String, int)Ok, I'm gonig to let you use your brains to put two and two together on this one. And I'll give a breif discription with no example.
(See chapters 3 and 4 to get the fundaments of this one)
Returns the position of the last occurence of the string that you input, the search begins in reverse at the int you input...
Chapter Six: Using length()length() returnsthe length of the specified string, real simple, real useful

EXAMPLE:
String kunk = "kunk"
int boop = kunk.length();
return boop;
It would return 3. Now woah wait a minute... Yes I did say three... Most, if not all string operators work on the basis of numbers from 0 on up... So if you want the REAL length you need to do...
String kunk = "kunk"
int boop = kunk.length() + 1;
return boop;
Movin' on to bigger and better things
Chapter Seven: String Conversions!Now... Everyone is probably wondering how to change a string that is a number into a Double or an int right?!?! I AM!!! ...If you're still reading this I'm amazed, good job.
You need to use parseInt and parseDouble to do these next activities. Double.parseDouble(String) converts a string to a double, and Integer.parseInt(String) coverts a string to an int.
EXAMPLE:
Int...
String kunk = "55555"
int kunk2 = Integer.parseInt(kunk);
return kunk2;
Double...
String kunk = "55555.55"
int kunk2 = Double.parseDouble(kunk);
return kunk2;
This has many uses as you can not readily do calculations with strings.
Chapter Eight: String ConcatinationYou've most likely seen this before. It is the most widely used, and never thought about String method used to date. You take it for granted! It is used by putting variables into a print method easier than normal using + signs... Some examples are below.
EXAMPLE: (monkey is a variable)
Without String concatination...
System.out.print("I think ");
System.out.print(monkey);
System.out.print(" kunk rocks!");
With It...
System.out.print("I think " + monkey + " kunk rocks!");
Chapter Nine: Using toLowerCase()toLowerCase() pretty much does what it implys. It takes a string and converts all the letters of the string to lowercase, so, if you were wondering how runescape keeps you from yelling all the time, there it is!
EXAMPLE:
String kunk = "SELLING D CHAIN";
String lowercasekunk = kunk.toLowerCase();
return lowercasekunk;
It'd return "selling d chain"
Chapter Ten: Using toUpperCase()Polar opposite of chapter nine, see example.
EXAMPLE:
String kunk = "selling d chain";
String lowercasekunk = kunk.toUpperCase();
return lowercasekunk;
It'd return "SELLING D CHAIN"
Chapter Eleven: Using trim()trim() is an uncommonly used String method because it is very rarely needed. trim() takes off the "WhiteSpace" charecters at the begining and end of a string... So basically it deletes the unneeded chars at the beginning and end of your string input, I'm not even 100% sure what the output of it is... So i won't give an example...
Chapter Twelve: Using compareTo(string, string)Ok, this one is not as useful as the on in chapter thirteen but it's useful nonetheless... If the first string comes alphabetically before the second it returns a negitive number...
compareTo("kunk", "zebra")
If they are equal it returns 0.
compareTo("kunk", "kunk")
If the first comes alphabetically after the second it returns positive.
compareTo("kunk", "blue")
Chapter Thirteen: Using equals(string, string)equals(string, string) is one of the rare boolean return methods of the string family. it returns true or false based on the two strings... it's very simple really. If inputted string one is the same as two it returns true. Or else it returns false.