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. Hi sir !

I have two Crystal Report

View Tutorial          By: Anderson Abad at 2011-07-20 03:34:51

2. good explanation.
View Tutorial          By: praneeth at 2011-06-20 23:28:00

3. hi all,

i successfully executed the

View Tutorial          By: praveen at 2010-07-14 04:47:41

4. Thanx..very useful in this pgm..
View Tutorial          By: priya at 2013-02-06 10:54:44

5. practical example of funcation overloding
View Tutorial          By: yogesh at 2010-12-19 08:39:06

6. Thanks to the author, it was really a good tutoria
View Tutorial          By: Ashok Kumar at 2010-04-29 05:54:47

7. thanks this material is very helpful for me
View Tutorial          By: Anonymous at 2009-05-09 08:04:31

8. "For example, float can be useful when repres
View Tutorial          By: rangzen at 2014-03-28 09:31:47

9. Controlling Page Navigation in JSF - Static and Dy
View Tutorial          By: chip at 2010-10-07 05:16:14

10. Of course you can use this in a web application. A
View Tutorial          By: Ramlak at 2008-09-17 08:24:21