Results 1 to 3 of 3
  1. #1
    Anagha is offline Member
    Join Date
    Mar 2011
    Posts
    30
    Rep Power
    0

    Default What Should be my Reurn type for returning a file

    Hi All,
    i want write an method which will take File name as parameter what should be my return type. String Array or File.

    Please Help me.....
    Thanks in Advance.

  2. #2
    ozzyman's Avatar
    ozzyman is offline Senior Member
    Join Date
    Mar 2011
    Location
    London, UK
    Posts
    797
    Blog Entries
    2
    Rep Power
    4

    Default

    In case you need more attribute from the File, return the File object.

    If you'd never need anything other than just the name, then return the String name as it is less "heavy" than returning the File object.

    To be honest though, I'd rather keep the File object as you'd probably need to do more stuff with it later.

  3. #3
    Anagha is offline Member
    Join Date
    Mar 2011
    Posts
    30
    Rep Power
    0

    Default

    Thankx ozzyman,

    I Need to open an Excel sheet and Further use columns from that excel sheet.
    I am storing data in String Array.

Similar Threads

  1. Replies: 6
    Last Post: 02-10-2011, 09:55 AM
  2. Java Netbeans File Type help
    By VanGo in forum NetBeans
    Replies: 4
    Last Post: 01-19-2011, 11:07 PM
  3. retain value of input type file in a jsp file while being dynamically generated
    By nidhi c in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2009, 02:21 AM
  4. Mime type of a file from web
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-03-2008, 05:20 PM
  5. Mime type of a file
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 03-03-2008, 05:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •