2 ms·
"What is the meaning of the name 'RuntimeException' ? Why is the class so named? Think about this for a minute ... ALL exceptions are thrown at runtime right?"
by alex_stoddard 17y ago
"What is the meaning of the name 'RuntimeException' ? Why is the class so named? Think about this for a minute ... ALL exceptions are thrown at runtime right?"
That has been bothering me subconsciously for years!
It is very nice to have the explanation for the name:
"Recall that Java has a class called as the “Runtime” class – an abstracted representation of the underlying Java Virtual Machine that allows us to add hooks and get information. So the simple answer to “What is the meaning of the name RuntimeException” is “It is an exception thrown by the Runtime itself” rather than any particular piece of code."