java.util.Timer: Is it deprecated?

前端 未结 6 1496
既然无缘
既然无缘 2020-12-01 08:26

I read in a comment to this answer and in many other questions about scheduling (sorry, no references) that java.util.Timer is deprecated. I really hope not sin

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-01 08:53

    No, it's not deprecated. In addition to Sun's Deprecated List, you'll also see a note in the JavaDoc for a class that has been deprecated. For example, the note for StringBufferInputStream says:

    Deprecated. This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class.

提交回复
热议问题