Syntax, Logic, Runtime Errors in Java

A description of three types of errors in Java programming.

Source code available on GitHub:

This video is part of this playlist:

Similar Posts

2 thoughts on “Syntax, Logic, Runtime Errors in Java
  1. Hi Brandan, can you help me figure out which three line of code to choose to satisfy these conditions? Here's the question:

    You are creating a Java method

    The method excepts a String parameter named text. It returns true if text meets any of the following conditions.

    • Is null

    • Contains only an empty string

    • Contains only whitespace characters

    Otherwise, the method returns false.

    Code Segments Answer Area

    If (text.isEmpty()) return true;

    If (text == “ ”) return true;

    return false;

    If (text == null) return true;

    If (text.trim()isEmpty()) return true;

    return true;

    I've tried to run three lines and can't figure this one out?

    Thank you

Leave a Reply

Your email address will not be published. Required fields are marked *