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. this is a very good artical about floating &
View Tutorial          By: Gayathri at 2012-10-31 12:19:28

2. programs are making the concept easy.its a nice pr
View Tutorial          By: veeru at 2010-05-12 22:10:25

3. thanks or the infromation about switch statement
View Tutorial          By: mikko at 2008-09-01 23:48:44

4. what about the access modifiers, while talking abo
View Tutorial          By: Seetha at 2010-06-04 01:14:02

5. Nearly perfect help, but the path I had to use was
View Tutorial          By: Martin Zeltner at 2009-09-15 04:15:19

6. Hi Grenfel, would this be possible??


View Tutorial          By: Lerianne at 2012-08-20 11:37:32

7. Good examples for beginners.
View Tutorial          By: Sagar at 2009-10-16 01:04:46

8. Its very useful to me
View Tutorial          By: suba at 2011-07-04 11:21:19

9. i am in beginning level, i tried by this code. but
View Tutorial          By: Shahana Akter at 2014-09-09 10:30:21

10. Hi everybody,
cn u plz mail me the working

View Tutorial          By: Srijita at 2011-11-28 06:10:03