66 940
Assignments Done
99,1%
Successfully Done
In October 2018

Answer to Question #62895 in Java | JSP | JSF for Sharma

Question #62895

System.out.println("date1 is "+mmddyyyy1+" date2 is "+mmddyyyy2);

int mm1 = // *-* find the month value from mmddyyyy1
int dd1 = // *-* find the day
int yyyy1 = // *-* find the year
int mm2 = // *-* find the month value from mmddyyyy2
int yyyy2 = // *-* find the day
int dd2 = // *-* find the year
Expert's answer

public class Main {

public static void main(String[] args) {
// TODO code application logic here
String mmddyyyy1 = "12111995";
String mmddyyyy2 = "24102016";

System.out.println("date1 is " + mmddyyyy1 + " date2 is " + mmddyyyy2);

int mm1 = Integer.parseInt(mmddyyyy1.substring(0, 2));
int dd1 = Integer.parseInt(mmddyyyy1.substring(2, 4));
int yyyy1 = Integer.parseInt(mmddyyyy1.substring(4, 8));
int mm2 = Integer.parseInt(mmddyyyy2.substring(0, 2));
int dd2 = Integer.parseInt(mmddyyyy2.substring(2, 4));
int yyyy2 = Integer.parseInt(mmddyyyy2.substring(4, 8));

}

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions