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. Very Useful example, Thanks
View Tutorial          By: Prabhat Kumar Singh at 2011-12-21 20:44:00

2. I have maked all you said and when I open jsp I am
View Tutorial          By: ismail at 2011-03-16 04:08:53

3. To make this work with out error I had to add:
View Tutorial          By: Jester at 2009-03-26 15:25:59

4. This example is working fine....I think BillGates
View Tutorial          By: Monoj Rath at 2010-07-15 01:27:51

5. good one
View Tutorial          By: vij at 2009-06-03 16:00:12

6. DOWNLOAD IT
View Tutorial          By: KUSUM at 2010-02-02 23:48:50

7. Hello my question is that . I want to run a audio
View Tutorial          By: Bharath at 2011-08-09 04:14:53

8. semicolon(*;) is missed in first line..con .close(
View Tutorial          By: Reddymalla Babu Sircilla at 2013-02-22 09:01:29

9. yes simple good it wroking goog
View Tutorial          By: durga prasad pavirala at 2009-02-11 03:43:04

10. Respected sir,
I am trying to embed windows

View Tutorial          By: arshad at 2011-10-22 17:05:21