Website reference

like for c++ we refer to

cppreference.com

can you suggest such trusted website for Java?

try this

Oracle docs
https://docs.oracle.com/javase/8/

Also for any queries you can always use stackoverflow/google.