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

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -