Java Static Initializer Block

  • + 0 comments

    You can simply print out the error message using System.out.println("errorMessage");,

    But for better learning try-catch is good practice.