package yun;

public class MAIN {
  public static void main(String args[])
  {
  int i=10;
  System.out.println("i++="+(i++)+"\t"+"++i="+(++i));
  System.out.println("i--="+(i--)+"\t"+"--i="+(--i));
  
  int a=5;
  int b=4;
  int c=5/4;
  double e=5.0d;
  double d=4.0d;
  double f=5.0/4.0;
  System.out.println("5/4="+c+"\t"+"5.0/4.0="+f);
  
  String  s1="GXM";
  String  s2="boy";
  String  s3=s1+s2;
  System.out.println("s1+s2="+s3);
  
  if(s1 instanceof String)
      System.out.println("s1 is String");
  else
      System.out.println("s1 is not String" );
  
  boolean bool=true;
  int m=bool?5:3;
  System.out.println(m);  
  
  }
}

  输出:
  i++=10 ++i=12
  i--=12 --i=10
  5/4=1 5.0/4.0=1.25
  s1+s2=GXMboy
  s1 is String
  5

 

posted on 2013-01-07 20:37  一把刷子  阅读(138)  评论(0编辑  收藏  举报