Java中的字符


Java中的字符

public class DemoJava {

   public static void main(String []args) {

      char  ch1;
      char  ch2;
      char  ch3;
      char  ch4;

      ch1 = 'a';      
      ch2 = '1';
      ch3 = '$';
      ch4 = '+';  

      System.out.format( "ch1: %c\n", ch1);
      System.out.format( "ch2: %c\n", ch2);
      System.out.format( "ch3: %c\n", ch3);
      System.out.format( "ch4: %c\n", ch4);

   }
}