[13] What is the code that will create a stream named fileIn that is a member of the class Scanner. It should connect the stream to a text file named Sam so that the program can read input from the...

[13] What is the code that will create a stream named fileIn that is a member of the class Scanner. It should connect the stream to a text file named Sam so that the program can read input from the text file Sam? a) Scanner fileIn = new Scanner(FileInputStream("Sam")); b) Scanner fileIn = new Scanner(new File("Sam")); c) Scanner fileIn = new Scanner(new FileStream("Sam")); d) Scanner fileIn = new Scanner(new FileInputStream(new File("Sam"))); e) none of the above [14] All of the following are correct except: a) You cannot use an abstract class constructor to create an object of the abstract class. b) You can only create objects of the derived classes of the abstract class. c) An abstract class is a class with two or more abstract methods. d) An Abstract class must have the modifier abstract included in the class heading. e) None of the above [15] What is the output of this program? import java.io.*; public class files { public static void main(String args[]) { File obj = new File("/java/system"); System.out.print(obj.getName()); } } a) java b) system c) /java/system d) java/system e) none of the above

May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here