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. you have helped me so much! thanks a lot ya! i rea
View Tutorial          By: NATION WHITE CHIRARA at 2013-09-19 07:53:57

2. nice material
View Tutorial          By: ravi at 2008-12-24 00:40:12

3. I love http://www.java-samples.com very much , I w
View Tutorial          By: Phongveth at 2009-03-13 13:15:04

4. Hi Friends,

I got a very interestin

View Tutorial          By: Rohit Kapur at 2011-07-27 20:56:57

5. Thx, this helped a lot.

How can I I

View Tutorial          By: Marko at 2008-10-09 01:32:37

6. Excellent!!!!!!!!!!!!
View Tutorial          By: Ramana at 2009-01-02 19:31:58

7. Plz help me......its urgent
i need a code

View Tutorial          By: Nisha at 2010-03-22 00:38:42

8. plz send me some interview based simple java progr
View Tutorial          By: Abilesh at 2013-06-23 06:43:03

9. Hi Ramalak, I am suffering with the same error as
View Tutorial          By: Divya at 2008-11-06 22:46:12

10. Sir, can you give me an example of Isalnum in java
View Tutorial          By: Angeline at 2011-07-13 06:43:54