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. i am getting a error when try this sms application
View Tutorial          By: Prabhash at 2009-06-03 06:45:26

2. it is very good for best practice of basics.......
View Tutorial          By: sushil ghimire at 2015-03-01 13:27:57

3. lllllllllllllllllllllllllllllike
View Tutorial          By: duck at 2015-04-10 19:19:47

4. org.replaceAll("is","was"); en
View Tutorial          By: nirosha at 2013-01-28 16:19:11

5. thanks , but i want it some thing like fibonici se
View Tutorial          By: Arpit Agrawal at 2015-01-04 18:34:41

6. Excellent work mate! works like a charm! Lifesaver
View Tutorial          By: jmcg at 2015-01-29 02:31:56

7. thanks for posting
View Tutorial          By: sriram at 2011-11-24 06:38:42

8. HOW TO SET PASSWORD IN JAVA.....
View Tutorial          By: NAKUL at 2012-12-14 05:23:16

9. very nice
View Tutorial          By: Md Irshad Alam at 2014-10-29 18:58:53

10. Hi... I used this code.But I am troubling that the
View Tutorial          By: Sandip Gurule at 2013-10-14 13:34:49