How to do references in Java work?

Help with Java homework?

  • The purpose of this assignment is to work with both the File class and recursive program development. You will write a program called FindFile. The program will take two command line arguments. A path string (if there are any special characters in the string, such as a space character, remember to enclose the string in quotation marks) from where the program will start searching. A file name string (only the filename and extension, no path information). Example usage: > java FindFile "C:/Program Files/Java" java.exe The output will consist of a list of all files in all directories under the first command line argument that matches the second command line argument. The full path name will be displayed. Remember to make your program robust so that if the user enters invalid command line arguments messages may be displayed (perhaps some exceptions thrown), but all situations should be handled reasonably gracefully (i.e., messages should explain the problem, and not just crash without any detailed indication of what is wrong). Suggested references: Look at the java.io.File and java.util.ArrayList or java.util.Vector classes in the Java Documentation. In particular, look at In class File: listFiles() getPath() getName() isDirectory(), In class ArrayList or Vector: add() toArray() [Optional] You can also try playing around with filters to allow you to use wildcard characters in your specification of the file name string. Is there anybody out there who can help me with my homework?

  • Answer:

    the answer is yours ,

Colin at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

I can do it you can free live chat with me for this to get step by step guidance or full work from me

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.