Comment on Tutorial - compareTo( ) in Java By Mashoud



Comment Added by : hemn

Comment Added at : 2010-04-17 06:02:00

Comment on Tutorial : compareTo( ) in Java By Mashoud
hi,
Very nice tutorial. But please I have some problems with this function. here is my problem:
I have created a dictionary that uses text files as database. The text files are encoded in UTF-8 format. I read them with InputStreamReader(is, "UTF-8");
and save them in an array of string. Nothing problem till here.
But the problem will start when I want to compare individual elements with the text I want. The loop passes through the correct one but using String.compareTo() will not stop it.
I have used different methods to decode both texts but nothing worked.
Any help will be appreciated.


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. sample program in packages and interface combined
View Tutorial          By: priya at 2009-09-10 05:42:31

2. Hi Sir...
sir i am a student and I am work

View Tutorial          By: Sanzu at 2013-02-12 09:13:01

3. i'ma beginer in this android devopment tutorial ca
View Tutorial          By: vijay at 2015-08-18 05:16:54

4. Travis could you share steps to configure correctl
View Tutorial          By: Shailesh S. at 2015-09-09 09:36:20

5. but how is the string concatenation done with the
View Tutorial          By: Vipin at 2009-05-09 03:08:51

6. Very good. but why i can search data then report v
View Tutorial          By: ARMAN AHMED at 2015-04-27 13:18:04

7. hi
Can you anyone please post me the entir

View Tutorial          By: yasmeen at 2009-05-25 02:42:44

8. hi .the program does run thank you for that ,i nee
View Tutorial          By: mazen at 2008-09-09 04:55:16

9. hai

Please show ByteAraayOutputStre

View Tutorial          By: WebMayuri at 2010-02-10 22:30:01

10. need to be explained more
View Tutorial          By: parul at 2011-06-30 08:34:29