Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Passing "const" variable to method in Java

Is there an equivalent in Java to the passing on const references in C++?
Isn't leaving out the "constness" misleading in regard to the method signature?

like image 507
LK. Avatar asked Feb 02 '09 07:02

LK.


1 Answers

BTW: Java does have const as a keyword, but you cannot use it anywhere.

like image 53
Peter Lawrey Avatar answered Sep 19 '22 07:09

Peter Lawrey