Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 11 Which of the following statements enables you to write output to a text file? PrintWriter out = new PrintWriter(); PrintWriter out = new

QUESTION 11

Which of the following statements enables you to write output to a text file?

PrintWriter out = new PrintWriter();

PrintWriter out = new PrintWriter("output.txt");

FileReader reader = new FileReader("input.txt");

Scanner in = new Scanner(reader);

QUESTION 12

Which of the following cannot be serialized?

I ArrayList

II String

III Integer

I

II and III

III

All can be serialized

QUESTION 13

Which method in the RandomAccessFile class provides for random access?

move

seek

goto

offset

QUESTION 14

Which code moves the file pointer to the middle of a RandomAccessFile object, file?

file.seek(file.length() / 2)

file.seek(file.length())

file.seek(0L)

file.seek(file.getFilePointer() / 2)

QUESTION 15

Which is an advantage of storing numbers in binary format?

I fast access

II less storage needed

III easy to read in a text editor

I

III

I and II

I and III

QUESTION 16

A file pointer is a position in a random access file. Because files can be very large,

the file pointer is of type _______.

double

byte

int

long

QUESTION 17

Which is not a method in the RandomAccessFile class?

getFilePointer

seek

scan

length

QUESTION 18

If you want to process text data from a file, which keyword do you look for in classes that specialize in doing that?

text

serializable

binary

reader

QUESTION 19

Caesar cipher uses a shift of each character by a key with a value between 1 and 255. An a with a shift equal to 3 becomes a d. A z would become a c, wrapping around the alphabet.Which key should you use to encrypt picture into mfzqrob?

3

19

-3

-19

QUESTION 20

How many bytes does the read method in the InputStream class actually return to the program call?

1

2

4

8

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Creating A Database In Filemaker Pro Visual QuickProject Guide

Authors: Steven A. Schwartz

1st Edition

0321321219, 978-0321321213

More Books

Students also viewed these Databases questions