File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes newbee cant find string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "newbee cant find string" Watch "newbee cant find string" New topic
Author

newbee cant find string

scott hanson
Greenhorn

Joined: Feb 27, 2004
Posts: 2
In my mock library you can check for a title to borrow(this works),and return "if" you have a book to return.I can check a string in an object(!"".equals(book1.getTitle())).Cant figure out how to check for title if book is borrowed (borrowed object is book object with getTitle method).
???if (!"".equals(patron1.getBorrowed1()))???Im very newbee-ish,Need something like this,I think,maybe,well...er.Something that workd though.



\\my libraryinterface is a huge newbee(helloworld last fall)mess, Hope I pulled the relevant code.thankyou
ps no error message just incorrect results
[ edited to format code and to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ February 28, 2004: Message edited by: Dirk Schreckmann ]

scott hanson
David Peterson
author
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
I haven't tried to understand your code, but just from the first few lines of your message, is this what you need:
David Peterson
author
Ranch Hand

Joined: Oct 14, 2001
Posts: 154
You might also like to look at some of the Java collections classes in the java.util.* package, and consider using a List or Set to hold the books.
 
Consider Paul's rocket mass heater.
 
subject: newbee cant find string