Every line of source code is a instruction to the interpreter or the compiler.
The result is equivalent but they work totally different. In your java example the first line is a variable declaration. Java requires it, C requires it, but PHP, Javascript, and python don't require them.
It's not a special command, it's just how you tell the program how to store that content. In bash when you do the first assignment, the interpreter allocates some memory automatically to stores its value. In other languages you must specify what you will store beforehand. It's just the way it was made.