Results 1 to 3 of 3
  1. #1
    qwerty5683 is offline Member
    Join Date
    Feb 2015
    Rep Power

    Default Method header for file names?

    I'm new to Methods and do not really know how to write a method header. What would an appropriate header look like for the following instance? getFilename: This method takes no parameters. It asks the user for a filename. If that file exists, it returns the filename. If it does not exist, it asks the user for another filename. It continues to ask for filenames until the user gives the name of a file that exists.

    Also, how would I make a return tag for this and call it into the main method. Could someone explain this to me?

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: Method header for file names?

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Rep Power

    Default Re: Method header for file names?

    So basically you don't know any Java at all beyond a simple "hello world".

    Well, go learn it then.

    Trail: Learning the Java Language (The Java™ Tutorials)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 2
    Last Post: 12-05-2011, 06:15 AM
  2. Replies: 1
    Last Post: 07-06-2010, 04:50 PM
  3. Replies: 4
    Last Post: 03-03-2009, 09:39 AM
  4. how to make header file?
    By rams in forum New To Java
    Replies: 9
    Last Post: 10-24-2008, 08:16 AM
  5. Getting method names using Reflection
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-24-2008, 03: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