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. very nice..!
View Tutorial          By: neeraj at 2012-04-21 11:12:08

2. thankssss to prograem
View Tutorial          By: maha at 2010-05-21 05:14:36

3. hai.....people ..............


View Tutorial          By: spartan at 2009-08-08 08:42:35

4. This all works fine, but when I read records from
View Tutorial          By: Ayac at 2011-10-31 10:58:21

5. cool!!!

can you show me some sample

View Tutorial          By: eduard jacob bernido at 2008-07-14 04:01:59

6. This is a cool tutorial ! :) But I think in this s
View Tutorial          By: ngocanh at 2013-07-11 02:33:06

7. Hi, I need the complete working code for sending a
View Tutorial          By: Balaji Srikaanth at 2007-03-10 01:22:35

8. ..i have a question. is it possible to override a
View Tutorial          By: rein at 2010-08-25 07:07:15

9. can you non grab the data direct from the vector w
View Tutorial          By: paul at 2013-08-30 11:22:04

10. Is it possible to create a Reader class without lo
View Tutorial          By: bs at 2010-10-11 05:42:34