The specification of the Java language does not specify how long time certain statements will take to execute, so there is no answer to your question.
A smart enough compiler is free to compile both statements to a no-op and still be compliant. In fact, the JIT will most likely do so in both of these cases.
5
solved Which for loop is faster in java and why [closed]