Throwable and Errors

Source: Internet
Author: User

/*Abnormal system:----------| Throwable the superclass of an exception or error class--------------| Error error errors are generally used for JVM or hardware-initiated problems, so we do not normally use code to handle errors. --------------| Exception exceptions need to be handled by code.    How to distinguish between errors and exceptions: If the program has an unhealthy message, if the class name of the unhealthy information ends with an error, then it must be a mistake. If it ends in exception, it's definitely an exception. */classDemo9 { Public Static voidMain (string[] args) {//Java Virtual machines can only manage 64m of memory by default.         byte[] buf =New byte[1024*1024]; System.out.println ("Hello world!"); }}

Throwable and Errors

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.