public class RandomIOWithStrings
extends java.lang.Object
Constructor and Description |
---|
RandomIOWithStrings() |
Modifier and Type | Method and Description |
---|---|
static void |
input()
Reads student name, grade and credits data from a RandomAccessFile with
fixed-length String and int variables, and prints the data to the
terminal window.
|
static void |
main(java.lang.String[] args)
Main menu program to input and output RandomAccessFile records.
|
static void |
output()
Writes student name, grade and credits data to a RandomAccessFile with
fixed-length String and int variables.
|
public static void main(java.lang.String[] args)
args
- the String[] array command line argumentspublic static void output() throws java.io.IOException
java.io.IOException
- for any invalid file operationjava.util.InputMismatchException
- if input for 'credits' is not an integerpublic static void input() throws java.io.IOException
java.io.IOException
- for any invalid file operationjava.util.InputMismatchException
- if 'student ID' is not entered as an integer