Can we add structures in Java?
•
Java
I was asked this question in an interview and couldn't answer it I hope you can help me
The question is: why don't Java people add support for structures? Why is it impossible to add value types allocated on the stack to Java?
I think the previous java version should have some backward compatibility problems? But I can't ask any questions
Solution
Although Java does not allow stack allocation, it does use something called escape analysis
Found a link to this: http://www.ibm.com/developerworks/java/library/j-jtp09275/index.html
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
二维码