Bug 388 - The constructor Date(String) is deprecated
Summary: The constructor Date(String) is deprecated
Status: RESOLVED FIXED
Alias: None
Product: online shop management system
Classification: Unclassified
Component: Products (show other bugs)
Version: 1.0.0
Hardware: PC Windows
: Low enhancement
Assignee: Samuel Yuen
URL:
Depends on:
Blocks:
 
Reported: 2020-11-01 18:39 HKT by Samuel Yuen
Modified: 2020-11-10 19:07 HKT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuel Yuen 2020-11-01 18:39:16 HKT
When initializing testProduct.java
The Date constructor used for testing is deprecated.
The program still works, but try to find one not deprecated.
It will be better for future development.

Warning Message:
The constructor Date(String) is deprecated
/gameshop/src/testProduct/testProduct.java
Comment 1 Samuel Yuen 2020-11-03 19:03:37 HKT
The Date class is now changed to SimpleDateFormat.
By using SimpleDateFormat, it can simply parse the date string in the format we want, and used for further purpose.
The Class and Test Unit are updated.