Selected 30 java written test questions

A start() B run() C exit() D getPriority()

Answer: abd

2. The following is about Java The correct statement of lang. exception class is ()

A inherits from throwable B serialable CD. I don't remember. It's incorrect anyway

Answer: a

Extension: difference between error and exception (error vs exception)

java. Lang. error: subclass of throwable, used to mark serious errors. Reasonable applications should not try / catch such errors. The vast majority of mistakes are abnormal and should not occur at all. java. Lang. exception: subclass of throwable, used to indicate a reasonable condition that the program wants to catch. That is, it is only a program running condition, not a serious error, and encourages the user program to catch it.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>