Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #27579

comparison of two string

Newsgroups comp.lang.java.programmer
Date 2014-02-23 23:13 -0800
Message-ID <43f5b47b-d5ef-46e4-b6cd-af228c1742df@googlegroups.com> (permalink)
Subject comparison of two string
From Navneet Mathpal <navneetmathpal93@gmail.com>

Show all headers | View raw


why equal is not comparing it although data is same ???



  for (int i=0;i<blen;i++)
                    {
                    	System.out.println("Best :"+best[i]);
                    	String bb=best[i];
                        for(int j=0;j<flen;j++)	
                    	{   
                    		String ff=found[j];
                    		System.out.println("Found "+found[j]);
                    		
                    		
                    		if(bb.equalsIgnoreCase(ff))
                    		{
                    			count=count+1;
                    			System.out.println("hello");
                    		  resfound.add(found[j]);
                    		}
                    		
                    	}




OUTPUT IS :

Best :17601089
Found 18769218
Found  17601089
Found  7240354
Found  18668662
Found  530777
Found  12538756
Found  15441407
Found  11669171
Found  12062082
Found  12626411
Best :  18668662
Found 18769218
Found  17601089
Found  7240354
Found  18668662
Found  530777
Found  12538756
Found  15441407
Found  11669171
Found  12062082
Found  12626411
Best : 9967149
Found 18769218
Found  17601089
Found  7240354
Found  18668662
Found  530777
Found  12538756
Found  15441407
Found  11669171
Found  12062082
Found  12626411

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

comparison of two string Navneet Mathpal <navneetmathpal93@gmail.com> - 2014-02-23 23:13 -0800
  Re: comparison of two string Roedy Green <see_website@mindprod.com.invalid> - 2014-02-23 23:16 -0800
  Re: comparison of two string Andreas Leitgeb <avl@auth.logic.tuwien.ac.at> - 2014-02-24 10:46 +0000
    Re: comparison of two string Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-02-24 07:59 -0500
      Re: comparison of two string Arne Vajhøj <arne@vajhoej.dk> - 2014-02-24 19:24 -0500

csiph-web