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



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 not useful. bits2 is always changed. be care
View Tutorial          By: ash at 2011-07-25 23:13:30

2. Hi..
i a'm Sajid mestri (Maha,sangli)

View Tutorial          By: sajid at 2010-10-30 00:32:15

3. That was very nice yaar.
View Tutorial          By: sana at 2014-02-21 09:20:34

4. programming for java is excelent
View Tutorial          By: roldan at 2010-07-19 00:22:52

5. I want to know that what is the main use of the &q
View Tutorial          By: Krunal Patel at 2012-09-17 08:11:19

6. I went befly through this, it is woderful, usefull
View Tutorial          By: Mallikarjuna.N at 2009-11-28 11:41:58

7. Excelent article, I will start to use struts 2 now
View Tutorial          By: Alex at 2010-01-20 16:13:34

8. What exactly is d directry for d folder Media?? It
View Tutorial          By: Oraclematrix at 2012-01-15 21:40:54

9. can anybody suggest me to write a java prog. to ke
View Tutorial          By: Giri at 2015-03-23 17:56:58

10. How to send to multiple mobiles at a time
View Tutorial          By: rakesh at 2010-04-30 10:33:51