Monday 28 November 2016

Does Java have a `::` operator?




Does Java have a :: operator? Please, do not close this question, I did search the docs and I'm sure it does not but I want to be completely sure.



I.e can there be something like MyClass::x or anything visually resembling that in Java.



Answer



until and including Java 7: No!



Java 8: Yes!



simply as that.


No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...