• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

newbee cant find string

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
author
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic