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. sr. habla espanol necesito su ayuda... alguno tien
View Tutorial          By: ROGER HERNANDEZ at 2011-09-13 15:20:01

2. hiii frnds will u ls send me the program for sendi
View Tutorial          By: Taha Sharif at 2008-10-31 00:37:15

3. Hi
I have final project whit sms program.
View Tutorial          By: AliPour at 2011-09-11 16:51:19

4. my quseation is why use we return statement

View Tutorial          By: pankaj kumar at 2010-08-31 03:53:48

5. i want to SCJP exam ,tell how to apply for this ex
View Tutorial          By: jasmina at 2013-04-22 11:05:53

6. Hi, I need the complete working code for sending a
View Tutorial          By: Unnati at 2011-07-13 05:06:06

7. nice one !!! just keep it .. i have learn a lot..
View Tutorial          By: dondon at 2011-07-27 04:43:40

8. I am in search of the institute to appear for the
View Tutorial          By: Rahul at 2012-07-02 11:18:18

9. how to send data one pc to another with java progr
View Tutorial          By: usman at 2011-05-14 01:31:31

10. very thanks... It's very useful to me...
Th

View Tutorial          By: swathi. M at 2015-01-02 16:32:19