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. The code is running successfully.........but , I m
View Tutorial          By: Harshita at 2013-03-26 19:25:58

2. Hi,
I wann to insert data into excel file b

View Tutorial          By: PRUTHVIRAJ RATHOD at 2011-05-23 11:42:14

3. Barely can understand it even I'm a NEWBIES ^^
View Tutorial          By: YieonChee at 2012-11-28 17:56:24

4. thanks. that was fair enough. :)
View Tutorial          By: Mustafa at 2010-05-16 10:12:33

5. hi
i try to write a code for send data or s

View Tutorial          By: mjh at 2011-02-16 08:26:10

6. Hi,
Pls help me.I need a full java code wit

View Tutorial          By: karan at 2009-11-26 11:29:56

7. I am using MacOSX 10.5.4 and only enabling the mod
View Tutorial          By: Sachin at 2011-03-26 00:23:05

8. Thank you sir this is a nice example/
View Tutorial          By: Techbymak at 2013-01-08 09:51:54

9. I want full information about Java & Data Stru
View Tutorial          By: s.karthick at 2015-05-07 05:32:24

10. i get exception NoSuchPortException. i tried on di
View Tutorial          By: harryjoy at 2009-11-22 05:52:48