DAY 19

🔖 오늘 읽은 범위 : QUIZ


  1. **What is better, to throw Exceptions or return error codes? ***

    Error Codes

    Exceptions

  2. **When should we write try/catch/finally? ***

    First, before we write any code.

    At the end, when cleaning the code.

  3. **What kind of information should our error messages have? ***

    The stack trace only.

    The operation that failed, type of failure, more information about the error.

  4. **Why shouldn’t we return ‘null’ from methods/functions? ***

    We might forget to check for null and can easily have null pointer exceptions.

    The code does not run.

  5. **Is passing ‘null’ as an argument a good practice? ***

    Yes

    No

  6. **Having dirty tests can be worse than having no tests at all. ***

    True

    False

  7. **Test code is as important as production code. ***

    True

    False

  8. **How many concepts should a test function test? ***

    Multiple

    One

  9. **Should tests depend on each other ***

    Yes

    No

  10. **What output should a test have? ***

    Boolean

    None, throw an error.