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. When I tried to run this code, I got time out ***
View Tutorial          By: Gandhi at 2009-06-04 06:20:48

2. Hello Sir/Madam, I want to know the basic concepts
View Tutorial          By: venkatesh at 2012-12-24 06:17:00

3. Hi, i am new java, and i want to become gud develo
View Tutorial          By: amit at 2012-02-16 12:21:25

4. how to trim in jsp page and to send the trimed con
View Tutorial          By: monishaa at 2015-07-16 10:06:11

5. Hi...i know java but little....
give simple

View Tutorial          By: Murshidha at 2012-02-06 09:52:52

6. Hi I am developing a code for data transfer from
View Tutorial          By: Rajavel at 2014-03-21 14:17:54

7. Programs are so good..!
i wish to say one t

View Tutorial          By: Shashikumar Misal at 2012-09-01 20:35:47

8. thanks...please give some more examples
View Tutorial          By: Iqra at 2012-06-24 18:57:51

9. It is working. Thank u dear!!!
View Tutorial          By: Ashwani Rana at 2009-04-02 03:56:17

10. Thanks a LOT !!
I was confused with this !

View Tutorial          By: rishabhsethi at 2012-10-31 15:07:07