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



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. Good Work ...
View Tutorial          By: Sagan at 2013-08-13 13:38:30

2. Dudes

I used the abov

View Tutorial          By: Nithin p at 2013-01-06 06:54:33

3. It was actually useful!!! Thanks for explaining in
View Tutorial          By: steph at 2010-01-28 21:59:06

4. The example shown in this article uses 8-bit opera
View Tutorial          By: wisnu at 2012-10-04 05:11:51

5. I take it English is not your 'hardcore', because
View Tutorial          By: Fred at 2013-01-17 14:49:09

6. Thanks. Helped me save few hours
View Tutorial          By: Balan at 2008-04-07 18:25:08

7. thank you very much....
View Tutorial          By: divya at 2013-01-06 15:50:43

8. Basic Example to undestand java literal persons
View Tutorial          By: Sajid mestri (maha,sangli) at 2010-10-30 00:44:44

9. can you clearly reveal how to create crystal repor
View Tutorial          By: halim at 2011-07-02 00:28:48

10. super
View Tutorial          By: Dhana at 2007-01-30 03:21:00