# Usin Comprable Interface to compare strings

**URL:** <https://forum.kirupa.com/t/usin-comprable-interface-to-compare-strings/308244>\
**Category:** Uncategorized\
**Created:** [April 20, 2010, 2:40am UTC](https://forum.kirupa.com/t/usin-comprable-interface-to-compare-strings/308244 "2010-04-20T02:40:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![koolkrasher](https://avatars.discourse-cdn.com/v4/letter/k/c6cbf5/32.png) [@koolkrasher](https://forum.kirupa.com/u/koolkrasher)\
**Post date:** [April 20, 2010, 2:40am UTC](https://forum.kirupa.com/t/usin-comprable-interface-to-compare-strings/308244/1 "2010-04-20T02:40:39Z")

</div>

This is my goal.

I have 2 class’s  
Person (authors)  
Book (can have single or many authors. authors are stored in an Array of Person objects)

What i want to do is run the **comparable interface** to find out which book comes first based on the first author.

I have overwritten the method and it works with number data such as year, pages but I can not seem to get it to work with strings.

Anyone have any ideas?
