Reputation: 1275
I want to develop a time slot where there are small time periods in that main time slot. I can't import java.time package and it says that package does not exist.
I have jdk1.8.0_111 and from NetBeans -> Tools -> Java Platforms, I have added. I still can't import the package correctly. Please help me to import this package and continue.
Upvotes: 2
Views: 5453
Reputation: 339422
The java.time classes are built into Java 8 and later. Be sure to:
Note that Java 9 fixes a few bugs and adds a few enhancements to the java.time classes over that of Java 8. So when Java 9 ships, revisit all three of those bullets above.
Much of the java.time functionality is back-ported to Java 6 & 7 in ThreeTen-Backport. Add this library to your project.
The ThreeTenABP project adapts ThreeTen-Backport (mentioned above) for Android specifically.
Upvotes: 1