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. Dear admin,
your Recaptcha design is not go

View Tutorial          By: surendra kumar sharma at 2013-02-02 05:58:35

2. the ans is good.now i cleared my dout.and the exam
View Tutorial          By: siva at 2011-12-07 14:00:13

3. i searched a lot of sites but found the answer her
View Tutorial          By: ALIEN ATTACK at 2012-01-09 09:39:36

4. Thanks a lot!
The main reason why we need t

View Tutorial          By: SA at 2011-06-24 15:00:13

5. it is a good example thanks
View Tutorial          By: tadeleh at 2012-11-13 12:46:08

6. provided examples are very useful.
View Tutorial          By: Technical Guy at 2010-04-25 08:12:06

7. i need How to connect with database connection in
View Tutorial          By: Renjit at 2010-01-04 01:54:25

8. Thanks so much useful to me.
View Tutorial          By: Bhuvan at 2012-05-31 14:57:57

9. very brief and easy to understand description of R
View Tutorial          By: moona at 2010-05-26 22:49:26

10. thanks a lot fo the help offered.
View Tutorial          By: Douglas [email protected] at 2012-10-31 05:37:04