Comment on Tutorial - compareTo( ) in Java By Mashoud



Comment Added by : Adam

Comment Added at : 2009-11-10 12:55:51

Comment on Tutorial : compareTo( ) in Java By Mashoud
Example:

String sOne = "hello there";
String sTwo = "hallo there";

What would my output be in this situation?

out.print(sOne.compareTo(sTwo));

and in this situation...

out.print(sTwo.compareTo(sOne));


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. It is very helpful, I searched in many websites, b
View Tutorial          By: Anil Vaja at 2013-10-14 17:21:42

2. In the above example..where you make the GC1 objec
View Tutorial          By: prasad at 2014-12-11 11:12:28

3. I could not understand, anyone having an easier ex
View Tutorial          By: aatish at 2011-09-14 09:52:28

4. i want jsp code
View Tutorial          By: KIRTHANA at 2015-07-31 05:29:04

5. it's very nice answer
View Tutorial          By: ahmedmohsen at 2011-12-31 19:26:09

6. Hi friends i am the beginner ..
please guid

View Tutorial          By: Jigar at 2013-05-20 11:04:03

7. How can i update status 1 and 0 in RMS ?
an

View Tutorial          By: maaz at 2011-06-16 02:54:28

8. i am getting d following error:-

Se

View Tutorial          By: nikitha at 2013-02-07 09:23:12

9. hi i m deepika mittal . i m working on the same pr
View Tutorial          By: deepika Mittal at 2009-05-30 06:55:22

10. Thanks a lot for this great post.
View Tutorial          By: Ram Para at 2012-03-23 17:07:09