About Question enthuware.ocpjp.v7.2.1401 :
Posted: Tue Apr 05, 2016 11:00 am
I vaguely recall a question from an earlier test saying something about how a File object can never be changed once it is created.
So then how can renameTo(File newFile) work?
I'm assuming that it's similar to when you try to change a String, where you don't actually change the String but a new String is created and the reference is reassigned to that String.
So then how can renameTo(File newFile) work?
I'm assuming that it's similar to when you try to change a String, where you don't actually change the String but a new String is created and the reference is reassigned to that String.