如果JVM崩溃,该线程是否仍然存在? [英] Does the Thread still exist if the JVM crashes?

查看:51
本文介绍了如果JVM崩溃,该线程是否仍然存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

面试中有人问我这个问题,有人知道吗?

I was asked this question during an interview, does anybody know?

推荐答案

如果线程正在运行,则JVM不会崩溃.

If a thread is running the JVM has not crashed.

但是,有时人们会错误地将抛出的任何异常描述为崩溃.如果这是访问者的意思,我会说该线程仍在运行,因为捕获了该异常并且没有将该异常重新抛出.

However, sometimes people incorrectly describe any exception being throw as a crash. If this is what the interviewer meant, I would say the thread is still running because the exception was caught and not rethrown.

这篇关于如果JVM崩溃,该线程是否仍然存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆