Java Reference
In-Depth Information
5 . What is the difference between the String methods indexOf( ) and lastIndexOf( ) ?
The indexOf( ) method finds the first occurrence of the specified substring. lastIn-
dexOf( ) finds the last occurrence.
6 . Since all strings are objects of type String , show how you can call the length( ) and
charAt( ) methods on this string literal: "I like Java".
Search WWH ::




Custom Search