public class OtherCharMethods
1: // Fig. 29.17: OtherCharMethods.java
2: // Non-static Character methods.
3:
4: public class OtherCharMethods
5: {
6: public static void main( String args[] )
7: {
8: Character c1 = 'A';
9: Character c2 = 'a';
10:
11: System.out.printf(
12: "c1 = %s\nc2 = %s\n\n", c1.charValue(), c2.toString() );
13:
14: if ( c1.equals( c2 ) )
15: System.out.println( "c1 and c2 are equal\n" );
16: else
17: System.out.println( "c1 and c2 are not equal\n" );
18: } // end main
19: } // end class OtherCharMethods
20:
21: /**************************************************************************
22: * (C) Copyright 1992-2005 by Deitel & Associates, Inc. and *
23: * Pearson Education, Inc. All Rights Reserved. *
24: * *
25: * DISCLAIMER: The authors and publisher of this book have used their *
26: * best efforts in preparing the book. These efforts include the *
27: * development, research, and testing of the theories and programs *
28: * to determine their effectiveness. The authors and publisher make *
29: * no warranty of any kind, expressed or implied, with regard to these *
30: * programs or to the documentation contained in these books. The authors *
31: * and publisher shall not be liable in any event for incidental or *
32: * consequential damages in connection with, or arising out of, the *
33: * furnishing, performance, or use of these programs. *
34: *************************************************************************/