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. Hai,
dis is anu, dng final year. i need to

View Tutorial          By: anu at 2012-07-12 15:41:19

2. Can you tught me matrix function and friend functi
View Tutorial          By: Shiv pratap singh at 2013-01-12 06:46:46

3. thank you, this best for student like us,
View Tutorial          By: Srinath at 2012-05-12 15:04:03

4. hi how ru
anybody tell me that how to print

View Tutorial          By: imran at 2010-12-10 00:34:51

5. ...indeed its a helpful brief explanation, coz our
View Tutorial          By: elaine22 at 2010-01-22 01:27:16

6. Thanks for the syntax, this has really helped me u
View Tutorial          By: Ketobbey at 2010-04-30 19:01:29

7. Was useful
View Tutorial          By: Vasan at 2008-06-22 05:04:20

8. dear sir, plz answer my following questions:

View Tutorial          By: hawa at 2012-01-29 08:29:39

9. hi any one can send me the code for HTTPclient pro
View Tutorial          By: indela at 2011-06-13 08:41:12

10. I am wanting to use a Honeywell 4600g handheld sca
View Tutorial          By: bugdrvr1970 at 2012-01-25 17:27:43