Your question is about JAVA.
About the only thing the two languages have in common are the first 4 letters of their names.
Try posting in the right forum.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.