Quiz 4 - Bce Repeaters

5 Questions | Total Attempts: 60

SettingsSettingsSettings
Please wait...
Quiz 4 - Bce Repeaters

Exception Handling, Interfaces, MultiThreading


Questions and Answers
  • 1. 
    Let’s say we want to read a file and display its contents on the screen. Let’s assume the file is located on a remote server and during the process of reading it, the connection goes down. In this case, we have an _______
    • A. 

      Compile time error

    • B. 

      Logical error

    • C. 

      Syntax error

    • D. 

      Exception

  • 2. 
    Exception handling is a mechanism, which allows exceptions to be ____ and _____
    • A. 

      Compile, caught

    • B. 

      Compile, try

    • C. 

      Try, thrown

    • D. 

      Thrown, caught

  • 3. 
    Try{    // Some code that may throw an exception}catch (ExceptionType objectName){    // Code handling an Exception}Within the try block we put the code that could throw exceptions.
    • A. 

      True

    • B. 

      False

  • 4. 
    Which of these can be used to fully abstract a class from its implementation?
    • A. 

      Objects

    • B. 

      Packages

    • C. 

      Interfaces

    • D. 

      None

  • 5. 
    Which of the following is correct way of implementing an interface salary by class manager?
    • A. 

      Class manager extends salary {}

    • B. 

      Class manager implements salary {}

    • C. 

      Class manager imports salary {}

    • D. 

      None of the mentioned.

Back to Top Back to top