ProAnswers.org

How The err field represents a PrintStream object?

Its purpose is to display error messages that should get immediate attention of the user.

public class MainClass {

 

  public static void main(String[] args) {

    System.err.println("You have a runtime error.");

 

  }

}

output

You have a runtime error.