Results 1 to 3 of 3

Thread: help with java code

  1. #1
    Join Date
    Oct 2010
    Posts
    3

    help with java code

    i am working on a java project, anyone got an experience on how to code the below description. am trying to read from an exsiting data that contains different item,want to be able to write a code to search through the data.

    i am trying to write a method that searches for an item and returns a reference to the object. Use the reference returned by the method to display the object’s data (i.e. item details). If the item is not found then the method should return null and the ‘caller’ should display an appropriate message, e.g. “item not found”. [provide output]

    thanks for your help

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: help with java code

    Code:
    public java.lang.Object search(java.lang.Object key)
    Search for an object in the tree that compares equal to key.
    Returns:
    If the object is found in the tree, return a reference to the object. Otherwise return null.

  3. #3
    Join Date
    Oct 2010
    Posts
    3

    Re: help with java code

    i tried that but that not what i was looking for, what i needed is to read an exsisting file( text.dat)
    and b able to search for words in the text file...

    thanks

Similar Threads

  1. help me to understand java code (calendar java code) ?
    By so0oma in forum Software Development
    Replies: 2
    Last Post: 10-01-2011, 12:01 AM
  2. Use Java code in PHP
    By Gajendra1 in forum Software Development
    Replies: 6
    Last Post: 12-08-2010, 10:18 AM
  3. Need Explanation for java code
    By javainfo in forum Software Development
    Replies: 2
    Last Post: 10-12-2009, 01:56 AM
  4. Cleaning Up Java Code
    By Namchan in forum Software Development
    Replies: 3
    Last Post: 20-04-2009, 11:48 AM
  5. Code execution in JAVA
    By jasonR in forum Software Development
    Replies: 1
    Last Post: 27-01-2009, 01:13 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,710,821,407.43668 seconds with 17 queries