waysun一路阳光

不轻易服输,不轻言放弃.--心是梦的舞台,心有多大,舞台有多大。踏踏实实做事,认认真真做人。

  BlogJava :: 首页 :: 新随笔 :: 联系 ::  :: 管理 ::
  167 随笔 :: 1 文章 :: 64 评论 :: 0 Trackbacks
public static boolean judgeEqual(String[]model)
 {
  /**无重复为false,有重复为true*/
  boolean flag=false;
  Set  set  =  new  HashSet(); 
  for(int  i  =  0;i<model.length;i++)
  { 
     if(!model[0].equals(model[i]))
     {
      flag=false;
     }
     else
     {
      flag=true;
     }
  } 
  
  return flag;
 }
 public static void main(String[]args)
 {
       String[] s  = {"1","1","1","1","1"};  
      System.out.println(judgeEqual(s));
 }
posted on 2009-02-22 19:32 weesun一米阳光 阅读(649) 评论(0)  编辑  收藏 所属分类: cnweblog/nm1504

只有注册用户登录后才能发表评论。


网站导航: