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



Ask a Question

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. i m new in java plz send package of simple program
View Tutorial          By: iqbal ahmad at 2009-09-07 01:26:41

2. Sir, this is very helpful for students and profess
View Tutorial          By: Pankaj Choudhary at 2010-10-19 00:24:36

3. Simple and easy code..........
View Tutorial          By: mandalson at 2011-12-24 04:08:12

4. Please help me send sms. I did everything , But no
View Tutorial          By: Prabhash V S at 2009-06-03 06:40:55

5. This is a good tutorial. Now how can I send SMS mu
View Tutorial          By: Alkesh at 2013-05-11 14:51:53

6. very nice example i really like it
View Tutorial          By: radha at 2012-03-15 17:50:52

7. abstract class Explain the concept of abstract c
View Tutorial          By: rahul at 2012-02-23 08:30:47

8. sir, am doing my mca project in java based on netw
View Tutorial          By: saravanapriya at 2011-11-24 03:25:06

9. i am new in java so pls send insrutions in java
View Tutorial          By: shefeeja at 2012-10-09 02:22:15

10. good explanation,
Thanks

View Tutorial          By: venkatesh at 2012-01-04 08:43:48