I agree with the other answers, but it also depends on why you are writing the code. If this is a specific project for the deadline, you may not have much chance. If it is likely to be reused by others, make sure that refactoring does not violate anything that they use. If this is a long-term project, especially a communal one, then he is almost certain that he will need extensive refactoring.
I wrote the community library for about 13 years and went through 5 and a half revisions (the one I'm going through). In many cases, this is due to the fact that the technology has improved, and what I have done for myself, now I can do with standard libraries. And over the years I have learned many better strategies.
In general, good refactoring often means dumping old code.
UPDATE
(, , ). , , , , , . , , , . , () , (b), . , , .
, , , API, . , ,
Date date = getLastUpdate();
( ), java.util.Date . Joda DateTime, . , , . API
DateTime date = getLastUpdate();
,
DateTime date = getLastDateTimeUpdate();
@Deprecated
, ( API- )