Alexey Dubinin

Greenhorn
+ Follow
since Mar 23, 2010
Alexey likes ...
IntelliJ IDE Oracle Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Alexey Dubinin

The simplest way is to use enum:

But remember that methods of this class should be thread safe.
12 years ago
This is bad solution because daylight saving changes can lead to error in calculations. You can try Joda time library.
12 years ago