Java coding

Description

Write a Java program that prompts the user for a filename and attempts to open the file as follows:
Scanner infile = new Scanner(new FileInputStream(

filename

));

If there an exception thrown as a result, the program should prompt the user to reenter the
filename until a valid filename exists. (Make sure to have a textfile as part of the project to open. It
should be in the main project folder, not in any of the project subfolders.) Go to the Java API (link in
Blackboard) and look up the constructor for the FileInputStream class to determine the exceptions

that the constructor throws.

Note that your program must import both the FileInputStream class, AND the class of the exception
type that the constructor of this class throws. Therefore, you must either use:

import java.io.* – to import ALL of the classes in the package
or

import java.io.FileInputStream;
import.java.io.

ExceptionClassName

We offer the bestcustom writing paper services. We have done this question before, we can also do it for you.

Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.