Matthew Brown wrote:It depends what you mean by the question. There are several Error classes for example, including: StackOverflowError, AssertionError, OutOfMemoryError. Is that the sort of error you're talking about?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:I agree with Matt - the question is vague at best.
edit - I would say the correct answer would be "Could you elaborate on what you mean by 'errors in java'".
OCPJP 6 86%
Nikhil Sagar wrote:
Matthew Brown wrote:It depends what you mean by the question. There are several Error classes for example, including: StackOverflowError, AssertionError, OutOfMemoryError. Is that the sort of error you're talking about?
I already posted the Full Question. I know the question is incomplete but just tell me a appropriate answer based on the information available.
Nikhil Sagar wrote:
fred rosenberger wrote:I agree with Matt - the question is vague at best.
edit - I would say the correct answer would be "Could you elaborate on what you mean by 'errors in java'".
""Could you elaborate on what you mean by 'errors in java'""
Wow fred this was exactly what i said to her.
And she replied with a smile that what about compile time errors ?
Jeff Verdegan wrote:
Nikhil Sagar wrote:
fred rosenberger wrote:I agree with Matt - the question is vague at best.
edit - I would say the correct answer would be "Could you elaborate on what you mean by 'errors in java'".
""Could you elaborate on what you mean by 'errors in java'""
Wow fred this was exactly what i said to her.
And she replied with a smile that what about compile time errors ?
Sounds like she's not a very good interviewer and is more interested in showing how clever she is than in actually engaging in a discussion with you to get a feel for your level of understanding of Java.
OCPJP 6 86%
Nikhil Sagar wrote:[
Agree Jeff, but in future if someone tell me that compile time errors are also errors in java, because many books use the line compile time errors.
But i realize that "compile time errors" is a wrong statement because in SCJP6 by K&B, authors never use "compile time error" they always use "compiler complains".
Jeff Verdegan wrote:
Nikhil Sagar wrote:[
Agree Jeff, but in future if someone tell me that compile time errors are also errors in java, because many books use the line compile time errors.
Well, yes, compile-time errors are a "type of error in Java." This is true. But when someone simply asks a vague, meaningless question like "How many types of errors are there in Java?" it's impossible to know what he means and what he's looking for without some clarification.
But i realize that "compile time errors" is a wrong statement because in SCJP6 by K&B, authors never use "compile time error" they always use "compiler complains".
No, it's not wrong. And K&B is not the ultimate authority on Java terminology. The JLS is. People use the phrase "compile-time errors" all the time, and although it may not be part of the official terminology from the JLS, it's in common use and everybody knows what it means. The term is not wrong in and of itself, and it's not wrong to say that compile-time errors are a type of error you can get in Java.
Now, having said that, there are contexts where it would be wrong, if the question was clearer. For example, if the question had been, "How many types of exception are there in Java", then "compile-time exception" is not correct. There is no such thing, especially in the sense that most people use it, where they seem to think that unchecked exceptions are "compile-time" exceptions. I understand where that thinking comes from, and there's a certain logic behind it, but it goes against the standard terminology, and it leads to confusion.
OCPJP 6 86%
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |