1: //: appendixa:Stringer.java
2: // From 'Thinking in Java, 2nd ed.' by Bruce Eckel
3: // www.BruceEckel.com. See copyright notice in CopyRight.txt.
5: public class Stringer {
6: static String upcase(String s) {
7: return s.toUpperCase();
8: }
9: public static void main(String[] args) {
10: String q = new String("howdy");
11: System.out.println(q); // howdy
12: String qq = upcase(q);
13: System.out.println(qq); // HOWDY
14: System.out.println(q); // howdy
15: }
16: } ///:~