ログイン

Comprog Mocktest (Midterm) BSIT 205
61問 • 1年前
  • Xai Alexandrei Delos Reyes
  • 通報

    問題一覧

  • 1

    is an event that occurs during the execution of a program that disrupts the normal flow of instructions.

    Exception

  • 2

    is the process used to change the normal flow of code execution if a specified exception occurs.

    Exception Handling

  • 3

    Exceptions that occur during compilation are called

    Checked Exceptions

  • 4

    The class is not found.

    ClassNotFoundException

  • 5

    Access to a class is denied.

    IllegalAccessException

  • 6

    Attempt to create an object of an abstract class or an interface.

    InstantiationException

  • 7

    A requested method does not exist.

    NoSuchMethodException

  • 8

    are exceptions that occur during execution. These are also known as runtime exceptions.

    Unchecked Exceptions

  • 9

    Arithmetic error, such as an integer divided by 0

    ArithmeticException

  • 10

    Accessing an invalid index of the array

    ArrayIndexOutOfBoundsException

  • 11

    Assigning a value to an array index that does not match the expected data type

    ArrayStoreException

  • 12

    Entering a value that does not match the expected data type

    InputMismatchException

  • 13

    Invalid use of a null reference

    NullPointerException

  • 14

    Invalid conversion of a string to a numeric format

    NumberFormatException

  • 15

    Accessing an invalid index (character) of a string

    StringIndexOutOfBoundsException

  • 16

    It is a block of code that might throw an exception that can be handled by a matching catch block

    Try Block

  • 17

    is a segment of code that can handle an exception that might be thrown by the try block that precedes it.

    Catch Block

  • 18

    method can be used to determine Java’s message about the exception.

    getMessage();

  • 19

    Only one (1) catch block is accepted in a program but there can be multiple try blocks.

    False

  • 20

    is created by extending the Exception class.

    User-Defined Exception

  • 21

    contains statements which are executed whether or not an exception is thrown.

    Finally Block

  • 22

    sends an exception out of a block or a method so it can be handled elsewhere.

    Throw statement

  • 23

    what's the catch block for a ArithmeticException?

    catch(ArithmeticException ex) {

  • 24

    is temporary.____ values (stored in variables) are lost when the computer loses its power.

    Volatile Storage

  • 25

    is permanent. A Java program that is saved on a disk uses a ____?

    Non-Volatile Storage

  • 26

    is a collection of data stored on a non-volatile device.

    Computer files

  • 27

    consists of data that can be read in a text editor. Data in a text file is encoded using a scheme.

    Text file

  • 28

    contains data that is not encoded as text. which means they cannot be understood by viewing them in a text editor.

    Binary file

  • 29

    the special character used to separate path components.

    \

  • 30

    creates objects that contain information about files and directories, such as sizes, locations, creation dates, and is used to check whether a file or directory exists

    Path class

  • 31

    performs operations on files and directories, such as determining their attributes, creating input and output streams, and deleting them.

    Files class

  • 32

    To use both the Path and Files classes, what statement should be used?

    import java.nio.file.*;

  • 33

    is a complete path; it does not require any other information to locate a file on a system

    Absolute path

  • 34

    C:\Java\Chapter8\sample.txt is an example of?

    Absolute path

  • 35

    - sample.txt - Chapter8\sample.txt - Java\Chapter8 are examples of ?

    Relative path

  • 36

    is a group of characters that has some meaning.

    Fields

  • 37

    is a collection of fields that contain data about an entity.

    Record

  • 38

    It consists of related records.

    File

  • 39

    If the data is taken from a source (such as a file or the keyboard) and is delivered into a program, it is called an _____

    input stream

  • 40

    If the data is delivered from a program to a destination (such as a file or the screen), it is called an ______

    output stream

  • 41

    It is a flow of data.

    stream

  • 42

    What is the correct syntax of Path class using this directory? C:\Java\Chapter8\sample.txt

    Path file Paths.get("C:\\Java\\Chapter8\\sample.txt");

  • 43

    Returns the String representation of the Path, eliminating double backslashes

    String toString()

  • 44

    Returns the file or directory denoted by this Path; this is the last item in the sequence of name elements.

    Path getFileName()

  • 45

    Returns the number of name elements in the Path

    int getNameCount()

  • 46

    Returns the name in the position of the Path specified by the integer parameter

    Path getName(int)

  • 47

    is a memory location into which you can write data, which you can read again later.

    Buffer

  • 48

    Abstract class that contains method for performing input

    InputStream

  • 49

    Provides the capability to read disk from files

    FileInputStream

  • 50

    Abstract class that contains method for performing output

    OutputStream

  • 51

    Provides the capability to write to disk files

    FileOutputStream

  • 52

    Handles input from a system’s standard or default output device (usually the monitor)

    BufferedOutputStream

  • 53

    Contains methods for performing output that never throws an exception

    PrintStream

  • 54

    Abstract class for reading character streams; the only methods that a subclass must implement are read(char[] int, int) and close()

    Reader

  • 55

    Reads text from a character-input stream, buffering characters to provide for efficient reading of characters, arrays, and lines

    BufferedReader

  • 56

    Reads text from a character-input stream, buffering characters to provide for efficient reading of characters, arrays, and lines

    BufferedReader

  • 57

    Writes text to a character-output stream, buffering characters to provide for the efficient writing of characters, arrays, and lines

    BufferedWriter

  • 58

    Checks whether the file exists and whether the program has permission to read the file

    READ

  • 59

    Checks whether the file exists and whether the program has permission to write to the file

    WRITE

  • 60

    Checks whether the file exists and whether the program has permission to execute the file

    EXECUTE

  • 61

    Checks whether the file exists

    NONE

  • The Contemporary World Mock test (Prelims)

    The Contemporary World Mock test (Prelims)

    Xai Alexandrei Delos Reyes · 58問 · 2年前

    The Contemporary World Mock test (Prelims)

    The Contemporary World Mock test (Prelims)

    58問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock test (Prelims)

    Computing Mock test (Prelims)

    Xai Alexandrei Delos Reyes · 67問 · 2年前

    Computing Mock test (Prelims)

    Computing Mock test (Prelims)

    67問 • 2年前
    Xai Alexandrei Delos Reyes

    Programming Mock Test (Prelims)

    Programming Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 64問 · 2年前

    Programming Mock Test (Prelims)

    Programming Mock Test (Prelims)

    64問 • 2年前
    Xai Alexandrei Delos Reyes

    Entrepreneurship Mock Test (Prelims)

    Entrepreneurship Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 23問 · 2年前

    Entrepreneurship Mock Test (Prelims)

    Entrepreneurship Mock Test (Prelims)

    23問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test (Midterms) BSIT 107

    Computing Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 76問 · 2年前

    Computing Mock Test (Midterms) BSIT 107

    Computing Mock Test (Midterms) BSIT 107

    76問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mock Test (Prelims)

    Math Mock Test (Prelims)

    Xai Alexandrei Delos Reyes · 48問 · 2年前

    Math Mock Test (Prelims)

    Math Mock Test (Prelims)

    48問 • 2年前
    Xai Alexandrei Delos Reyes

    Programming Mock Test (Midterms) BSIT 107

    Programming Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 52問 · 2年前

    Programming Mock Test (Midterms) BSIT 107

    Programming Mock Test (Midterms) BSIT 107

    52問 • 2年前
    Xai Alexandrei Delos Reyes

    UTS Mock Test (Midterms) BSIT107

    UTS Mock Test (Midterms) BSIT107

    Xai Alexandrei Delos Reyes · 40問 · 2年前

    UTS Mock Test (Midterms) BSIT107

    UTS Mock Test (Midterms) BSIT107

    40問 • 2年前
    Xai Alexandrei Delos Reyes

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 38問 · 2年前

    Entrepreneurship Mock Test (Midterms) BSIT 107

    Entrepreneurship Mock Test (Midterms) BSIT 107

    38問 • 2年前
    Xai Alexandrei Delos Reyes

    Contemporary World Mock Test (Midterms) BSIT 107

    Contemporary World Mock Test (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 28問 · 2年前

    Contemporary World Mock Test (Midterms) BSIT 107

    Contemporary World Mock Test (Midterms) BSIT 107

    28問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mocktest (Midterms) BSIT 107

    Math Mocktest (Midterms) BSIT 107

    Xai Alexandrei Delos Reyes · 24問 · 2年前

    Math Mocktest (Midterms) BSIT 107

    Math Mocktest (Midterms) BSIT 107

    24問 • 2年前
    Xai Alexandrei Delos Reyes

    Computer Programming Mocktest (Pre-finals)

    Computer Programming Mocktest (Pre-finals)

    Xai Alexandrei Delos Reyes · 26問 · 2年前

    Computer Programming Mocktest (Pre-finals)

    Computer Programming Mocktest (Pre-finals)

    26問 • 2年前
    Xai Alexandrei Delos Reyes

    Math Mocktest (Pre-Finals)

    Math Mocktest (Pre-Finals)

    Xai Alexandrei Delos Reyes · 19問 · 2年前

    Math Mocktest (Pre-Finals)

    Math Mocktest (Pre-Finals)

    19問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test (Pre-finals)

    Computing Mock Test (Pre-finals)

    Xai Alexandrei Delos Reyes · 36問 · 2年前

    Computing Mock Test (Pre-finals)

    Computing Mock Test (Pre-finals)

    36問 • 2年前
    Xai Alexandrei Delos Reyes

    Computing Mock Test Finals

    Computing Mock Test Finals

    Xai Alexandrei Delos Reyes · 26問 · 2年前

    Computing Mock Test Finals

    Computing Mock Test Finals

    26問 • 2年前
    Xai Alexandrei Delos Reyes

    Comprog 2nd sem (prelims) BSIT 205

    Comprog 2nd sem (prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 63問 · 1年前

    Comprog 2nd sem (prelims) BSIT 205

    Comprog 2nd sem (prelims) BSIT 205

    63問 • 1年前
    Xai Alexandrei Delos Reyes

    Discrete Math 2nd sem (prelims) BSIT 205

    Discrete Math 2nd sem (prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 36問 · 1年前

    Discrete Math 2nd sem (prelims) BSIT 205

    Discrete Math 2nd sem (prelims) BSIT 205

    36問 • 1年前
    Xai Alexandrei Delos Reyes

    Art Appreciation (Prelim) BSIT 205

    Art Appreciation (Prelim) BSIT 205

    Xai Alexandrei Delos Reyes · 56問 · 1年前

    Art Appreciation (Prelim) BSIT 205

    Art Appreciation (Prelim) BSIT 205

    56問 • 1年前
    Xai Alexandrei Delos Reyes

    Ethics 2nd sem (Prelims) BSIT 205

    Ethics 2nd sem (Prelims) BSIT 205

    Xai Alexandrei Delos Reyes · 45問 · 1年前

    Ethics 2nd sem (Prelims) BSIT 205

    Ethics 2nd sem (Prelims) BSIT 205

    45問 • 1年前
    Xai Alexandrei Delos Reyes

    STS 2nd Sem (Prelim) BSIT 205

    STS 2nd Sem (Prelim) BSIT 205

    Xai Alexandrei Delos Reyes · 40問 · 1年前

    STS 2nd Sem (Prelim) BSIT 205

    STS 2nd Sem (Prelim) BSIT 205

    40問 • 1年前
    Xai Alexandrei Delos Reyes

    問題一覧

  • 1

    is an event that occurs during the execution of a program that disrupts the normal flow of instructions.

    Exception

  • 2

    is the process used to change the normal flow of code execution if a specified exception occurs.

    Exception Handling

  • 3

    Exceptions that occur during compilation are called

    Checked Exceptions

  • 4

    The class is not found.

    ClassNotFoundException

  • 5

    Access to a class is denied.

    IllegalAccessException

  • 6

    Attempt to create an object of an abstract class or an interface.

    InstantiationException

  • 7

    A requested method does not exist.

    NoSuchMethodException

  • 8

    are exceptions that occur during execution. These are also known as runtime exceptions.

    Unchecked Exceptions

  • 9

    Arithmetic error, such as an integer divided by 0

    ArithmeticException

  • 10

    Accessing an invalid index of the array

    ArrayIndexOutOfBoundsException

  • 11

    Assigning a value to an array index that does not match the expected data type

    ArrayStoreException

  • 12

    Entering a value that does not match the expected data type

    InputMismatchException

  • 13

    Invalid use of a null reference

    NullPointerException

  • 14

    Invalid conversion of a string to a numeric format

    NumberFormatException

  • 15

    Accessing an invalid index (character) of a string

    StringIndexOutOfBoundsException

  • 16

    It is a block of code that might throw an exception that can be handled by a matching catch block

    Try Block

  • 17

    is a segment of code that can handle an exception that might be thrown by the try block that precedes it.

    Catch Block

  • 18

    method can be used to determine Java’s message about the exception.

    getMessage();

  • 19

    Only one (1) catch block is accepted in a program but there can be multiple try blocks.

    False

  • 20

    is created by extending the Exception class.

    User-Defined Exception

  • 21

    contains statements which are executed whether or not an exception is thrown.

    Finally Block

  • 22

    sends an exception out of a block or a method so it can be handled elsewhere.

    Throw statement

  • 23

    what's the catch block for a ArithmeticException?

    catch(ArithmeticException ex) {

  • 24

    is temporary.____ values (stored in variables) are lost when the computer loses its power.

    Volatile Storage

  • 25

    is permanent. A Java program that is saved on a disk uses a ____?

    Non-Volatile Storage

  • 26

    is a collection of data stored on a non-volatile device.

    Computer files

  • 27

    consists of data that can be read in a text editor. Data in a text file is encoded using a scheme.

    Text file

  • 28

    contains data that is not encoded as text. which means they cannot be understood by viewing them in a text editor.

    Binary file

  • 29

    the special character used to separate path components.

    \

  • 30

    creates objects that contain information about files and directories, such as sizes, locations, creation dates, and is used to check whether a file or directory exists

    Path class

  • 31

    performs operations on files and directories, such as determining their attributes, creating input and output streams, and deleting them.

    Files class

  • 32

    To use both the Path and Files classes, what statement should be used?

    import java.nio.file.*;

  • 33

    is a complete path; it does not require any other information to locate a file on a system

    Absolute path

  • 34

    C:\Java\Chapter8\sample.txt is an example of?

    Absolute path

  • 35

    - sample.txt - Chapter8\sample.txt - Java\Chapter8 are examples of ?

    Relative path

  • 36

    is a group of characters that has some meaning.

    Fields

  • 37

    is a collection of fields that contain data about an entity.

    Record

  • 38

    It consists of related records.

    File

  • 39

    If the data is taken from a source (such as a file or the keyboard) and is delivered into a program, it is called an _____

    input stream

  • 40

    If the data is delivered from a program to a destination (such as a file or the screen), it is called an ______

    output stream

  • 41

    It is a flow of data.

    stream

  • 42

    What is the correct syntax of Path class using this directory? C:\Java\Chapter8\sample.txt

    Path file Paths.get("C:\\Java\\Chapter8\\sample.txt");

  • 43

    Returns the String representation of the Path, eliminating double backslashes

    String toString()

  • 44

    Returns the file or directory denoted by this Path; this is the last item in the sequence of name elements.

    Path getFileName()

  • 45

    Returns the number of name elements in the Path

    int getNameCount()

  • 46

    Returns the name in the position of the Path specified by the integer parameter

    Path getName(int)

  • 47

    is a memory location into which you can write data, which you can read again later.

    Buffer

  • 48

    Abstract class that contains method for performing input

    InputStream

  • 49

    Provides the capability to read disk from files

    FileInputStream

  • 50

    Abstract class that contains method for performing output

    OutputStream

  • 51

    Provides the capability to write to disk files

    FileOutputStream

  • 52

    Handles input from a system’s standard or default output device (usually the monitor)

    BufferedOutputStream

  • 53

    Contains methods for performing output that never throws an exception

    PrintStream

  • 54

    Abstract class for reading character streams; the only methods that a subclass must implement are read(char[] int, int) and close()

    Reader

  • 55

    Reads text from a character-input stream, buffering characters to provide for efficient reading of characters, arrays, and lines

    BufferedReader

  • 56

    Reads text from a character-input stream, buffering characters to provide for efficient reading of characters, arrays, and lines

    BufferedReader

  • 57

    Writes text to a character-output stream, buffering characters to provide for the efficient writing of characters, arrays, and lines

    BufferedWriter

  • 58

    Checks whether the file exists and whether the program has permission to read the file

    READ

  • 59

    Checks whether the file exists and whether the program has permission to write to the file

    WRITE

  • 60

    Checks whether the file exists and whether the program has permission to execute the file

    EXECUTE

  • 61

    Checks whether the file exists

    NONE