This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
public class Book { public String title="kiss"; public String getTitle(){ return title; } public static void main(String[] args) { Book b=new Book(); String s=b.getTitle(); String t=s.toLowerCase(); System.out.println("the title is"+t); } } the code prints the title is kiss. i wonder what does toLowerCase mean thanks!
if the string object on which toLowerCase() is invoked contains uppercase characters , then a new string object with all characters lowercase is returned
however if the string does not contain lowercase characters then original string object is returned
Next time, type this in google: "java api toLowerCase()". It's going to give you the link to sun's api, which contains all the methods with the description.
The javadocs only tell you what the method does, they rarely talk about how something happens. But the method is written in Java, and part of the class library source (which ships with the JDK), so you can look it up there.
And if you're really interested in how toLowerCase works, check out Peter Norvigs take on it, and study his faster method.
It's interesting that Norvig picked toLowerCase rather than toUpperCase; his sped-up version cannot be used for toUpperCase because the upper-case version of the ß character is "SS", making the resulting string longer than the source string.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.