Can “void” be considered a primitive type in Java?
•
Java
I noticed the solar eclipse JDT uses void as a primitive type Can this be considered correct?
Solution
I found that in this case, you can't beat the Java language specification The fact that emptiness is not primitive is very clear
First, the vacancy is not in the list of primitive types Later, JLS made it clear that:
In addition, invalidity appears in the list of keywords instead of the text list
You see what you're doing because Michael Borgwardt's explained nice
So answer your question: No In Java, void cannot be considered a primitive Answer your body: Yes, the eclipse JDT code is correct and what it needs to do
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
二维码