Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
18 lines (17 loc) · 619 Bytes

File metadata and controls

18 lines (17 loc) · 619 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import java.util.Scanner;
class Test15
{
public static void main(String args[])
{
String date1,date2;
Scanner sc=new Scanner(System.in);
date1= sc.next();
date2 = sc.next();
String arr1[] = date1.split('/');
String arr2[] = date2.split('-');
String arr3[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};
if(arr1[0].equals(arr2[0])&&Integer.parseInt(arr1[1])==arr3[Integer.parseInt(arr2[1]-1)]&&arr1[2].equals(arr2[2]))
System.out.println("Same");
else System.out.println("Different");
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.