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. u doing good
View Tutorial          By: matsiko at 2009-04-14 08:05:00

2. aishwarya.. i also have that error.. have you solv
View Tutorial          By: Geok Lin at 2009-04-06 02:26:49

3. EJB's can be deployed on multiple servers and when
View Tutorial          By: Tomek at 2011-09-12 12:29:07

4. can u plz send me the source code for employee sal
View Tutorial          By: prudhvi at 2013-01-27 13:47:12

5. Looks good. This is going to be a good resource.
View Tutorial          By: Brainpower at 2013-03-02 02:45:11

6. i like your explanation it is understandable
View Tutorial          By: gerasmia yen-yen d. at 2009-07-15 21:12:39

7. hi
I have to learn java using NetbeansIDE

View Tutorial          By: Ekanki at 2011-08-04 10:30:36

8. javax.comm.NoSuchPortException
at j

View Tutorial          By: das at 2011-10-20 15:21:05

9. very helpful
View Tutorial          By: Lebo at 2012-04-20 07:37:49

10. Hello,

I was able to rectify port/

View Tutorial          By: Harsh at 2011-10-09 16:54:06