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
- Data Science
- Android
- AJAX
- ASP.net
- C
- C++
- C#
- Cocoa
- Cloud Computing
- HTML5
- Java
- Javascript
- JSF
- JSP
- J2ME
- Java Beans
- EJB
- JDBC
- Linux
- Mac OS X
- iPhone
- MySQL
- Office 365
- Perl
- PHP
- Python
- Ruby
- VB.net
- Hibernate
- Struts
- SAP
- Trends
- Tech Reviews
- WebServices
- XML
- Certification
- Interview
categories
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
Count number of vowels, consonants and digits in a String in Java
Student marks calculation program 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
Archived Comments
1. Thanks! It worked fine for me.
View Tutorial By: John Franklin at 2009-04-02 10:37:44
2. pls help me how to solve the timeout problem
View Tutorial By: nisha at 2010-09-20 22:29:17
3. i m very glad to know and use this site. this is w
View Tutorial By: Rupinder at 2009-09-08 08:49:23
4. 29. It is not a deadlock. What will actually happe
View Tutorial By: Sasha at 2012-01-24 14:34:03
5. Hello,
I would like to know how will take p
View Tutorial By: Jeff at 2011-02-02 23:05:17
6. I have tried that but still getting the same error
View Tutorial By: pra at 2008-04-14 21:55:44
7. wen i run i get dis error
jdbc:mysq
View Tutorial By: sandeep at 2009-11-24 08:24:20
8. semicolon(*;) is missed in first line..con .close(
View Tutorial By: Reddymalla Babu Sircilla at 2013-02-22 09:01:29
9. Hello,
I was able to rectify port/
View Tutorial By: Harsh at 2011-10-09 16:54:06
10. "paint() sample program to draw a line in J2M
View Tutorial By: Carlos Alberto Urrea at 2015-02-06 14:00:14