java - Storing a date with LocalDate -
i trying store previous date in localdate object, not sure how. have been using own class until now, apply java.time.localdate library. help?
my code: localdate thedate = new localdate(theyear, themonth, theday);
error message: localdate thedate = new localdate(theyear, themonth, theday);
try this:
the java 8 java.time.localdate class has no public constructors,
public class test { public static void main(string[] args) { int theyear=2016; int themonth=1; int theday=21; localdate thedate = localdate.of(theyear,themonth,theday); system.out.println(thedate); } }
Comments
Post a Comment