CS

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

How do you create a single catch block that catches two exceptions?

(only one expectation per catch block) so use a generic catch block that can catch any type of exception object like catch(Exception mistake) mistake is a variable

What is JCheckBox?

A JCheckBox consists of a label positioned beside a checkable square and frequently is used to allow the user to turn an option on or off. A ButtonGroup groups components so a user can select only one at a time. A JComboBox is a component that combines a display area showing a default option and a drop-down list box containing additional optio

Explain the JFrame more?

A JFrame holds and displays other objects. Useful methods include setSize(), setTitle(), setVisible(), setBounds(), and setDefaultCloseOperation(). JFrames include a title bar at the top containing text information, and Minimize, Maximize or Restore, and Close buttons in the frame's upper-right corner. When a user closes a JFrame by clicking the Close button in the upper-right corner, the default behavior is for the JFrame to be hidden and for the application to keep running.

What is the JTextField?

A JTextField is a component into which a user can type a single line of text data. A JButton is a component the user can click to make a selection.

Can a class implement event listener?

A class can implement as many event listeners as it needs. Examples of event listeners are ActionListener, ItemListener, KeyListener, and MouseListener. Any object can be notified about an event as long as it implements the appropriate interface and is registered as an event listener on the appropriate event source. Specific methods react to specific event types.

Explain a layout manager more?

A layout manager is a class that controls component positioning in a container. The normal (default) behavior of a JFrame is to use a layout format named BorderLayout. With FlowLayout, components are placed in rows; when any row is filled, additional components automatically spill into the next row.

What is the difference between a lightweight and a heavyweight component?

A lightweight component reuses the native (original) window of its closest heavyweight ancestor; a heavyweight component has its own opaque native window

Can a method that overrides another method throw an exception?

A method that overrides another method cannot throw an exception unless it throws the same type as its parent or a subclass of its parent's thrown type.

How do you use a virtual keyboard?

A user operates it by using a mouse to point to and click keys; if the computer has a touch screen, the user also can touch keys with a finger or stylus.

How do you create BasicFileAttributes?

BasicFileAttributes attr = Files.readAttributes(filePath, BasicFileAttributes.class);

How do you create a FileChannel?

Creating a usable FileChannel for randomly writing data requires creating a ByteBuffer and several other steps: You can use the Files class newByteChannel() method to get a ByteChannel for a Path. The newByteChannel() method accepts Path and StandardOpenOption arguments that specify how the file will be opened. The ByteChannel returned by the newByteChannel() method then can be cast to a FileChannel using a statement similar to the following: You can create a byte array. For example, a byte array can be built from a String using the getBytes() method as follows: The byte array can be wrapped into a ByteBuffer as follows: Then the filled ByteBuffer can be written to the declared FileChannel with a statement such as the following: You can test whether a ByteBuffer's contents have been used up by checking the hasRemaining() method. After you have written the contents of a ByteBuffer, you can write the same ByteBuffer contents again by using the rewind() method to reposition the ByteBuffer to the beginning of the buffer.

What are the donts for chapter 14?

Don't forget the x in javax when you import Swing components into an application. Don't forget to use a JFrame's setVisible() method if you want the JFrame to be visible. Don't forget to use setLayout() when you add multiple components to a JFrame. Don't forget to call validate() and repaint() after you add or remove a component from a container that has been made visible. Don't forget that the method itemStateChanged() that executes when an ItemEvent is generated in response to a check box action ends with a d, but the getStateChange() method that indicates whether a check box was selected or deselected does not. Don't forget that creating a ButtonGroup does not cause components to be grouped; each component that should be in the group must be added explicitly. Don't forget that the ButtonGroup class does not begin with a J.

What are the donts for chapter 15?

Don't forget to run the Make Controller command any time you delete a widget from the Scene Builder's Content panel, update an fx:id value, or update a method name in Scene Builder. Don't forget a semicolon is required at the end of a line of code in CSS, similar to code in JavaFX.

What is Java two basic class for errors?

Error class and Exception class they are both children of the Throwable class and grandchildren of the Object class

What are the four constructors in Exception class?

Exception() Exception(String message) Exception(String message, Throwable cause) Exception(Throwable cause) Exception()—Constructs a new Exception object with null as its detail message Exception(String message)—Constructs a new Exception object with the specified detail message Exception(String message, Throwable cause)—Constructs a new Exception object with the specified detail message and cause Exception(Throwable cause)—Constructs a new Exception object with the specified cause and a detail message of cause.toString(), which typically contains the class and the detail message of cause, or null if the cause argument is null

What is an alternative to using checkAccess( )?

Files.exists( ) and pass it in a Path argument

What else can you know about paths?

For Microsoft Windows platforms, the prefix of an absolute pathname that contains a disk-drive specifier consists of the drive letter followed by a colon. For UNIX platforms, the prefix of an absolute pathname is always a forward slash.

What is the delete( ) method errors?

If you try to delete a file that does not exist, a NoSuchFileException is thrown. A directory cannot be deleted unless it is empty. If you attempt to delete a directory that contains files, a DirectoryNotEmptyException is thrown. If you try to delete a file but you don't have permission, a SecurityException is thrown. Other input/output errors cause an IOException.

If you write a method with a throws clause for a checked exception in the header, then any method that uses your method must catch and handle the possible exception?

If you write a method with a throws clause for a checked exception in the header, then any method that uses your method must catch and handle the possible exception or declare the exception in its throws clause so the exception can be rethrown.

What are also subclasses of object class?

InputStream OutputStream Reader

Explain the stream classes:

InputStream: abstract class that contains methods for performing input FileInputStream: child of InputStream that provides the capability to read from disk files BufferedInputStream: subclass of FileInputStream and InputStream handles inputs from the keyboard OutputStream: abstract class that contains methods for performing output FileOutputStream: child of OutputStream that allows you to write to disk files

What is the Swing component a descendent of?

JComponent and the grandchild of the java.awt.Container class

What is JLabel?

JLabel is a built-in Java Swing class that holds text. The setFont() method changes the font typeface, style, and point size.

What is chapter 15 summary?

JavaFX is a powerful media and graphics framework that is used to create applications that use Graphical User Interfaces (GUI) in Java applications. JavaFX simplifies code development by separating the UI development from the application logic. The ability to separate the UI from the code allows the developer to easily customize the UI for different platforms, such as mobile devices, desktops, and the Web. JavaFX applications extend from the Application class, which extends directly from the Object class. You must call the inherited launch() method explicitly to launch an FX application. Three other methods are called automatically when an application runs: init(), start(), and stop(). The Stage class describes a container for an application; in a JavaFX application, a Stage object represents the entire window. This includes the title bar and the minimize, maximize, and close buttons. A Scene resides inside the Stage and contains all of the content of the application. The StackPane is the layout of the Scene, and can contain objects, such as buttons. JavaFX Scene Builder provides a visual layout environment that lets you design the UI for JavaFX applications without needing to write any code. You build the UI by dragging components onto a Scene and the FXML code for the layout is generated automatically. Commonly used widgets include text boxes, labels, radio buttons, check boxes, menu bars, and scroll bars. In JavaFX, each of these controls can be overridden to be customized to meet a variety of needs. CSS allows the developer to customize the appearance of a layout using fonts, styles, colors, and different effects on the appearance of the layout and its widgets. Scene Builder does not generate CSS files, but it does enable you to use a CSS editor to write and modify your own CSS file. Animation in JavaFX can be as simple as fading one scene to another, rotating an object, or having an object follow a path, and is created by modifying an object's properties such as color, size, opacity, and location.

How do you create a Paths object?

Path path = Paths.get("C:\\Java\\Chapter.13\\SampleFile.txt"); also known as filePath change the String passed to change the application with a different file

Where does System.out come from?

PrintStream object

What are some Path class methods?

String toString( ) return the string representation of the path and eliminates the backslashes Path getFileName( ) returns filenames or folder name (last item in the sequence of name elements) int getNameCount( ) returns the number of name elements in the Path Path getName( int) returns the name in the position of the Path specified by the integer parameter

What is a buffer?

StringBuilder sets aside a memory

How do you recognize a swing component?

Swing component names begin with J since each swing component is a descendent of the JComponent it also comes from java.awt.Container class

Explain the String class split( ) method?

The String class split() method accepts an argument that identifies a field delimiter and returns an array of Strings in which each array element holds one field. Then you can use methods such as parseInt() and parseDouble() to convert the split Strings to other data types.

What is the avantage of creating a child class of JFrame?

The advantage to creating a child class of JFrame is that you can set the JFrame's properties within your object's constructor; then, when you create your JFrame child object, it is automatically endowed with the features you have specified, such as title, size, and default close operation.

Explain virtual keyboard more:

The statement within the try block that defines a process is the only one that is new to you. Every Java application has a single instance of the Runtime class that allows the program to interface with its environment. The exec() method executes the operating system program named osk.exe. The acronym osk stands for on-screen keyboard. The exec() method throws an uncaught IOException, so its statement is contained in a try block. You were using Scanner class standard keyboard input and output shortly after you started this book. Now that you understand how exceptions are thrown, you also can use the virtual keyboard.

What are Methods for writing files?

WRITE: opens the file for writing APPEND: appends new data to the end of the file; use this option with WRITE or CREATE TRUNCATE_EXISTING: truncates the existing file to 0 bytes so the file contents are replaced; use this option with the WRITE option CREATE_NEW: creates a new file only if it does not exist; throws an exception if the file already exists CREATE: opens the file if it exists or creates a new file if it does not DELETE_ON_CLOSE : deletes the file when the stream is closed; used most often for temporary files that exist only for the duration of the program or use newOuputStream( ) method

Explain how to use the virtual keyboard further

When you write a program such as the one in Figure 12-48, no exception will ever be thrown—an exception is far more likely to occur if you accept the exec() method's String argument from user input. Therefore, it does not matter what statements you place in the catch() block. Instead of using a try...catch pair in the VirtualKeyboardDemo application, many programmers would eliminate the try block, place the phrase throws IOException at the end of the main() method header, and allow any exceptions to be rethrown to the operating system.

What is an event-driven program?

Within an event-driven program, a component on which an event is generated is the source of the event, and an object that is interested in an event is a listener. You prepare your class to accept button-press events by importing the java.awt.event package into your program and adding the phrase implements ActionListener to the class header. You register your class as a listener with the addActionListener() method, and then you implement the actionPerformed() method to contain the actions that should occur in response to the event.

What does Path path = fs.getPath("C:\\Java\\Chapter.13\\Data.txt") statement create?

a FileSystem object using the getDefault method in the FileSystems class the statement uses the FileSystems ( with and s) and FileSystem(without an s) class

What is text field?

a GUI component into which the user can type a single line of text data.

What is button group?

a GUI component that groups other components, such as check boxes, so a user can select only one at a time.

What is the finally block?

a block of code that executes at the end of a try-catch block regardless of whether the try block identities an exception and executes before it prematurely ends or crashes

What is a catch clause?

a catch block

What is layout manager?

a class that controls component positioning in a UI environment.

What is an absolute path?

a complete path; it doesnt need any other information to locate a file on the system C:\\Java\\Chapter.13\\SampleFile.txt

What is a source of an event?

a component on which an event is generated.

What is a virtual keyboard?

a computer keyboard that appears on the screen

What is sequential access file?

a data file that can be accessed one after the other in the order in which it was stored

What is generic programming?

a feature of languages that allows methods to be used safely with multiple data types.

What is java static feature?

a feature that allows you to use static constants without their class name to do this place the word static between import and the name of the package import static name of the package

What is seekable?

a file channel that you can seek anywhere in any specified location

What is a field?

a group of characters that has some meaning

What is an assertion?

a java language feature that helps you detect logic error and debug a program

What is a border layout manager?

a layout manager that divides a container into regions.

What is flow layout manager?

a layout manager that places components in rows; when any row is filled, additional components automatically spill into the next row.

What is an event handler?

a method that executes because it is called automatically when an appropriate event occurs.

What is a stream?

a pipeline or channel through which bytes flow into and out of an application most stream flows in one direction( input or output stream) but can sometimes flow in two or three way direction one direction stream the slowest operation

What is mission critical?

a process that is crucial to an organization

What is the Error class?

a program cannot recover from Error conditions on its own the error class are more serious conditions like insufficient memory etc DO NOT USE ERROR OBJECTS IN YOUR PROGRAM

What is an interactive program?

a program in which the user makes direct requests

What is event-driven program?

a program in which the user might initiate any number of events in any order.

What does crash mean?

a program that ends quickly or prematurely with an error

What is a windows?

a rectangular container that can hold GUI controls

What are catch blocks?

a segment of code that handles an exception

What is Abstract Windows Toolkit or AWT?

a set of GUI components that predates Swing and is less portable than the set of Swing components

What is a throw statement?

a statement that sends the Exception out of the block so it can be handled elsewhere

What is a try block?

a try is a procedure that might cause an error and a try block is a block of code that the programmer acknowledges will cause an error

What is a container?

a type of component that holds other components so they can be treated as a single entity

What is the Files class delete( )?

accepts a Path parameter and deletes the last element( file or directory) in a path or throws an exception if the deletion fails

What are some advantages of cycling through methods?

allows methods to handle exceptions wherever the programmer has deemed it most appropriate including allowing the operating system to handle the error

What is random access files?

also called direct access or instant access files in which records can be accessed be retrieved directly in any order

What is a stack trace history list?

also called stack trace, stack backtrack, or stack traceback it is a list that displays all the methods that were called during the execution

What is a file channel object?

an avenue for reading or writing a file

What is a throw clause?

an exception specification in a method when another method will catch the exception

What is a listener?

an object that is interested in and reacts to an event.

What is flushing?

an operation to clear bytes that have been sent to a buffer for output but have not been yet output to a hardware device

What file must always close?

an output file because the data will be inaccessible while nothing happens to input file

What is a look?

an uneditable GUI component that most often is used to provide information for a user.

What is an exception?

an unexpected or error condition

How should you arrange multiple catch blocks?

arrange it in a way that each Exception should fall through as many as necessary to reach the one that will hold it so do bigger basket first

What is an assert statement?

assert booleanExpression: optionalErrorMessage return true if the code is correct return false other wise or if code is false

What is wrapped?

be encompassed into another type- an array of bytes can be encompassed into a ByteBuffer using ByteBuffer wrap( )

What is graphic user interface(GUI) components?

button, text fields, and other components that the user can interact with

What is button and event?

button- a GUI component typically used to trigger an action or make a selection when the user clicks it. event-a result when a user takes action on a component.

How is the lowest element in Path class accessed?

by the getName( ) method and its index is one less than the number of elements on the list

What is catch or specify requirement?

catch it within the method specify the exception in your method's header's throw clause

How do you write a catch block to handle two exceptions ?

catch(ArithmeticException, InputMismatchException e){ }

How do you create a catch block?

catch(exception type and identifier){ * statements on how to handle the exception* } * statement that catch block executes or not* }

What is path delimiter?

character used to separate path components

What is check box and combo box?

check box- a GUI element with a label and a clickable square that frequently is used to turn an option on or off. combo box- a GUI component that combines a display area showing a default option and a list box containing additional options.

How do you check that a file exist?

checkAccess( ) method

What type of exception is subjected to the catch or specify requirement?

checked exception * code will not comply unless it follows the requirement*

What are BufferedWriter methods?

close( ): closes the stream, flushing it first flush( ):flushes the stream newline( ): writes a line separator write(String s, int off, int len): writes a String from position off for length len write(char[] array, int off, int len): writes a character array from position off for length len write(int c): writes a single character

What are some BufferedReader methods?

close(): closes the stream and any resources associated with it read(): reads a single character read(char[] buffer, int off, int len): reads characters into a portion of an array from position off for len charactersreadLine(): reads a line of text skip(long n): skips the specified number of characters

How do you handle a throw exception?

code catch blocks

What are heavyweight component?

components that require interactions with the local operating system

Where do place Swing components?

containers

What is another name for GUI componets?

controls or widgets

What is the toAbsolutePath?

converts a relative path to absolute path

What is Syntactic sugar?

created by Peter J Landin, it refers to aspects of computer science that makes it sweeter or easier for computer scientists to use refers to what java automatically gives to you that makes programming easier

What does open a file mean in java?

creates an object and associates a stream of bytes with it

What are text files?

data that can be read in text editor

What does the Files class deleteIfExists( ) do?

delete file but if no file exists nothing happens

What is a relative path?

depends on other path information( this happens when you are working with file that only has the file name not the drive letter or the top-level java folder

What are editable?

describes a component that can accept keystrokes.

What is Syntactic salt?

describes a language feature designed to make it harder to write bad code

What are real time applications?

describes applications that require a record to be accessed immeditly while a client is waiting

How do you create a FileSystem object?

determine the default file system on host computer by: Path path = fs.getPath("C:\\Java\\Chapter.13\\Data.txt");

What are syntax errors?

errors that are discovered during program's compiling

What is unchecked exception?

exceptions from the Error class or the RunTimeException class you can handle these exceptions but you are not required to do so

What are other names for the call stack?

execution stack, memory stack, or just stack

How do you create your own exception?

extend a subclass of Throwable (use Exception class)

What does the x in javax stand for?

extension

What is records?

fields that are grouped together that contain a data entity

What are comma separated values(CSV)?

fields that are separated with commas inside a record

What is the synatx you use with the checkAccess( ) method?

filePath.getFileSystem( ).provider( ).checkAccess *assuming you declared a path named filePath*

What are data files?

files that consists of related figures

What are binary files?

files that contain data that have not yet been encoded as texts they are still in binary form

What are program files?

files that store software instructions

What is application files?

files that store software instructions

How does a finally block look like?

finally{ }

What is the most common uses for the try method?

find a way around user data entry error

Which do programmers prefer to create windows or frame?

frame

How is a byte array constructed?

from the String wrapped into a buffer its is opened in create mode and a BufferedWriter is established

What is a TOCTTOU bug?

happens when a program find a file useable then unusable before its used in the statement happens when changes occur from Time Of Check to Time Of Use

What are permeant storage devices?

hardware storage devices that retain data even when the power is lost

What other import do you need for the checkAccess( )?

import java.io.IOException;

What do you have to import to use Java Path and Files class?

import java.nio.file.*;

What import statement do you use for Swing component?

import javax.swing.*; Swing classes are an extension of the original java language specifications

What import statement allows you to access constants that can be used as arguments to the method

import static java.nio.file.AccessMode.*;

Where are temporary variables stores?

in the computer RAM or main or primary memory

How do you use a variable outside the try catch block?

initialize it outside or before the try-catch block begins and declare a variable or assign a usable value to the variable within the catch block

What is a frame?

is a window with title bar and border a frame is a child of windows JFrame is the Swing object that is a child of Frame

What is the FileSystems(with an s) class used for?

it assist in object creation

What else can the try block be used for?

it can be used to handle data conversions exceptions

What happens when you remove static from import static java.nio.file.AccessMode?

it enables only AccessMode.Read

What else does throw statement do?

it sends the exception to the catch block

What is the Paths(class with an s)?

its an helper class that elimates the need to create a FileSystem object

What is the FileSystem(without an s) class used for?

its used to insatiate an object

What package should you import for exceptions?

java.util.*

What is the Exception class?

less serious errors that execute when the program is running and the program can recover from it

What is the call stack?

memory location where the computer stores the list of the memory location to which the system must return to after the execution ends

What is non volatile storage?

memory that does not require power to retain information files are not lose after power off so like java disk files

What is volatile storage?

memory that requires power to retain information temporary Internal computer memory (RAM) is volatile storage; disk storage is nonvolatile stored java programs are lost after power off

What are three characteristics of method you must know in order to use it?

method name method return type type and number of arguments required by method type and number of exception method throws

What is a factory method?

method that assist in object creation

What is exception handling?

name for object-oriented techniques that manage or resolve such errors

What does nio stand for?

new input/output because the classes are new and nio was created in java 7

What arguments can you use with the checkAccess method?

no argument- check the file exists read- check the file exists and the program has permission to read the file write-check the file exists and the program has permission to write the file execute- check the file exists and the program has permission to execute the file

Do you always have to handle exception errors?

nope because you can create a fault-tolerant and robustness program that can continue running regardless of the error

Can you use a variable in the try catch block outside the block?

nope make sure the variable only serves a temporary purpose

How many types of exception can a catch block handle?

only one

Why do you usually create a JFrame?

place other objects within it for display

What is batch processing?

process that involves performing the same tasks with many records one after the other

What are unreachable statements?

program statements that can never be executed under any circumstances

What is checked exceptions?

programmers should anticipate and check these exceptions and from which programs should be able to recover from all checked exceptions descend from the Exception class

What is a fault-tolerant program?

programs that are designed to continue running when some part of the system fail.

How does a method throw an exception?

public static void methodName( ) throws IndexOutOfBoundsException

What is a BufferedReader?

reads the line of text from character-input stream , buffering characters so reading is more efficient

What are files?

records grouped together

What is the readAttributes method for?

retrieve files this method takes two argument a Path object and BasicFileAttributes class

What does the creationTime( ) and lastModifiedTime( )?

return important file times FileTime objects are YYYY-mm-ddThh:mm:ss

What does the size( ) method do?

returns the size of the file in bytes

What is the difference between runtime errors and syntax errors?

runtime errors are discovered during execution while syntax errors are discovered during program compiling

What is the Java Foundation Classes(JFC)

selected classes the java.awt package including the swing component classes

What type of heavyweight component is used in Swing?

swing.JFrame swing.JDialog swing.JWindow swing.JApplet awt.Componet awt.Container awt.JComponet

What are some java prewritten sets of GUI components?

the Abstract Windows Toolkit(AWT): older sets before swing Swing : newer sets and still used today most names start with J JavaFX: newer sets

What is the Container class a child of?

the Component class

What is the Window class a child of?

the Container class

Where are containers defined in?

the Container class

What is the J in front of new class names of GUI components?

the J is to indicate that the set is newer Swing components have sets like JFrame and JButton etc

What is the Component class a child of?

the Object class

Where do all Java classes descend from?

the Object class

What happens when a method calls another?

the computer operating system must keep track of the method call origin and program control must return to the calling method when the called method is complete

What is robustness?

the degree to which a system is resilient to stress and maintain correct functioning

What are look and feel?

the elements of design, style, and functionality in a user interface.

What is a key field?

the field in the record that makes the record unique from all other records

What is an advantage to object-oriented exceptions handling?

the flexibility it allows in handling errors you gain the ability to appropriately deal with exceptions as you see to handle them programs are more clearer and flexible methods exceptions are handled in the same and consistent way or it can be handled differently

What are windows decorations?

the icons and buttons that are part of a window or frame.

What is root directory?

the main directory of a storage device outside the folders

What is the offending method?

the next method in the call stack that the might catch the exception

What are Pixels?

the picture elements, or tiny dots of light, that make up the image on a video monitor.

What are some disadvantages of cycling through methods?

the programmer finds it difficult to locate the original source of an exception

What is font?

the size, weight, and style of a typeface.

What is a character?

the smallest useful piece of data can be any letter, number or special symbol that comprises data characters are made up of bits

Is the throws clause part of the method signature or method interface?

the throw clause is part of the method interface

What is -ea?

to enable the assertion, you must use the -ea option when you execute the program; ea stands for enable assertion

What does close a file mean in java?

to make a file no longer available to an application

What is a register?

to sign up an object as an event listener.

All logic errors cause a program to terminate, and they should be handled by throwing and catching exceptions.

true

How does a try block look like?

try{ *executable statements* }

How many subclass does Throwable have?

two subclasses Error and Exception

What are runtimes exceptions?

unplanned exceptions that occur during a program's execution

How do you send error messages to another output?

use System.err instead of System.out

How do you display records in order?

use a sorting method

How to retrieve java built in message?

use the getMessage()

What is the java Path class for?

used to create objects about files and directories such as their location, sizes, creation dates, and whether they even exist

What is the java Files class used for?

used to perform operation on files and directories such as deleting them, creating input and output streams and determining their attributes

How are Path's elements accessed?

using an index the top-level element is at index 0

What are some methods of OutputStream?

void close(): closes the output stream and releases any system resources associated with the stream void flush(): flushes the output stream; if any bytes are buffered, they will be written void write(byte[] b): writes all the bytes to the output stream from the specified byte array void write(byte[] b, int off, int len): writes bytes to the output stream from the specified byte array starting at offset position off for a length of len characters

When does java display an exception error?

when the program has a preventable error in the code

What is exception specifications?

when you use the keyword throws followed by exception type in the header this is required when a method throws an exception that another method will catch

What does the write( ) method mean?

write() method accepts the String from position 0 for its entire length.

What are lightweight components?

written completely in java and do not rely on the code written to run in the local operating system the components do not have to rely on the operating system Swing components are examples

Can throw and catch block reside in separate blocks?

yes

Can you set a FileChannel's reading position based on a key field in a record and the record size?

yes

IS the toStrings() method overriden from the Object class?

yes

Is the system newline character written after the String is written?

yes

When you access a record from a random access file, can you usually calculate its position based on a key?

yes

Can you have multiple statements in a try block?

yes and you can have multiple catch blocks but one exception per catch block

Can a container take a form of window?

yes it can be dragged, resize, minimize, restore, and close

Is one of the benefit of using a random access file is the ability to retrieve a specific record from a file directly, without reading through other records to locate the desired one?

yes its a benefit

Can the finally always execute?

yes regardless of anything it can always execute

Can you use multiple arguments in the checkAccess( )?

yes separate them by commas

Can you process a random file sequentially or randomly?

yes you can

What can you use the java path and files class for?

you can use it to work with stored files


Set pelajaran terkait

EMT: Ch 28 Musculoskeletal Injuries

View Set

Chapter 6, 8, 9, & 10 Macro Review

View Set

Chapter 15: Interpersonal and Organizational Communication

View Set