import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
class check
{
public static void main(String args[]) throws IOException,Exception,ParseException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int testCases =Integer.parseInt(br.readLine());
Date[] enterTime1=new Date[4];
for(int i=0;i<testCases;i++)
{
String s=br.readLine();
String s1=br.readLine();
String [] splitStartTime=s.split("-");
String [] splitStopTime=s1.split("-");
enterTime1[0]=changeTime(splitStartTime[0]);
enterTime1[1]=changeTime(splitStartTime[1]);
enterTime1[2]=changeTime(splitStopTime[0]);
enterTime1[3]=changeTime(splitStopTime[1]);
boolean check=isOverlapping(enterTime1[0],enterTime1[1],enterTime1[2],enterTime1[3]);
if(check==true)
{
System.out.println("will need a moderator");
}
else
{
System.out.println("Who need a moderator");
}
}
}
public static boolean isOverlapping(Date start1, Date end1, Date start2, Date end2)
{
return start1.before(end2) && start2.before(end1) && start1.before(end1);
}
public static Date changeTime(String time) throws ParseException
{
DateFormat sdf1 = new SimpleDateFormat("hh:mm");
Date enterTime= sdf1.parse(time);
return enterTime;
}
}
Please help where i am going wrong