Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JAVA - CompareTo

  Asked By: Kaua    Date: May 16    Category: Java    Views: 580
  

can anyone show me how to use the compareTo method of COMPARABLE
to compare 2 strings

plz use code examples!!

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Alberta Miller     Answered On: May 16

do you want to do something like

if ("this".equals("this");

 
Answer #2    Answered By: Debbie Reyes     Answered On: May 16

> if ("this".equals("this");

Err if ("this".equals("this"));

 
Answer #3    Answered By: Leroy Schmidt     Answered On: May 16

Actually i wanted to do something like "this".CompareTo("that")

 
Didn't find what you were looking for? Find more on JAVA - CompareTo Or get search suggestion and latest updates.




Tagged: