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. How do use qsort to sort lines in text file?
View Tutorial          By: kenny at 2008-11-18 08:59:55

2. Hai people plz help it's urgent, i got no errors i
View Tutorial          By: Hopewell at 2011-10-13 22:57:45

3. Very good tutorial, but I have a small question he
View Tutorial          By: Mohammad NABIL at 2010-07-20 05:58:19

4. GOOD FOR BIGGENERS
View Tutorial          By: naresh at 2012-08-04 11:19:03

5. I have some questions : 1) Which type of GC used
View Tutorial          By: SP at 2013-06-04 15:48:59

6. A phone is considered a good phone if all of the f
View Tutorial          By: harish at 2012-12-24 06:59:04

7. Hi All could you pls. send the execution of the ab
View Tutorial          By: subbu at 2008-01-28 03:14:27

8. This is an excerpt from Java Complete Reference.Ju
View Tutorial          By: Guest at 2010-03-25 01:36:57

9. i should say, a lot of thank you because of this s
View Tutorial          By: merven at 2009-03-17 09:45:39

10. simply super...every one can understand
View Tutorial          By: prashanth at 2013-03-10 12:20:25