Explain JAVA code
Posted
by MIW
on Stack Overflow
See other posts from Stack Overflow
or by MIW
Published on 2010-03-20T01:45:54Z
Indexed on
2010/03/20
1:51 UTC
Read the original article
Hit count: 344
I need some help to explain the meaning from line 5 to line 9. Thanks
String words = "Rain Rain go away";
String mutation1, mutation2, mutation3, mutation4;
mutation1 = words.toUpperCase();
System.out.println ("** " + mutation1 + " Nursery Rhyme **");
mutation1 = words.concat ("\nCome again another day");
mutation2 = "Johnny Johnny wants to play";
mutation3 = mutation2.replace (mutation2.charAt(5), 'i');
mutation4 = mutation3.substring (7, 27);
System.out.print ("\'" + mutation1 + "\n" + mutation4 + "\'\n");
10.System.out.println ("Title length: " + words.length());
© Stack Overflow or respective owner