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. please send detail informatoin about j2me.. send a
View Tutorial          By: Saranya at 2011-07-06 03:00:21

2. I want an example...to get multiple values using S
View Tutorial          By: Madhu at 2015-07-13 19:57:14

3. I want to know that what is the main use of the &q
View Tutorial          By: Krunal Patel at 2012-09-17 08:11:19

4. Hi, i tried this tutorial with my own database and
View Tutorial          By: Dejan at 2015-03-18 13:06:27

5. Thank you, very useful example!
View Tutorial          By: Hui Chun Wai at 2013-03-24 15:07:53

6. The above code is not for storing values it return
View Tutorial          By: vinoj at 2010-04-28 15:58:47

7. thank you
i memorized it easly .

View Tutorial          By: kibrom at 2011-04-27 11:46:24

8. good but you don't express the programs examples
View Tutorial          By: anchal at 2010-09-29 02:40:02

9. Thanks. Your post was clear and worked perfectly a
View Tutorial          By: Suma at 2009-03-05 09:40:08

10. Hi,

This is very nice tutorial to

View Tutorial          By: Robvandam at 2010-05-03 00:29:38