转换成date,然后使用下面的方法:
public int compareTo(Date anotherDate)
Compares two Dates for ordering. Parameters:anotherDate - the Date to be compared. Returns:the value 0 if the argument Date is equal to this Date; a value less than 0 if this Date is before the Date argument; and a value greater than 0 if this Date is after the Date argume

解决方案 »

  1.   

    对,转换成Date后比较就行了。
      

  2.   

    你查一下api文档,里面有Date的parse方法
      

  3.   

    不行也可以用苕方法,分别getYear,getMonth,getDay后比较去,保证不出错,不过,老板看了会怀疑你的智商
      

  4.   

    java.text.SimpleDateFormat formatter=new java.text.SimpleDateFormat("yyyy-MM-dd");
    Date d=formatter.parse(datestring);
      

  5.   

    如果直接比较大小的话。 就用 str1>str2? 用< > 号比较就行。 两个str1只要格式一样就行。
      

  6.   

    用 compareTo大于 返回大于0 小于返回小于0  等于返回等于 0