import java.io.*;
import javax.swing.*;
class H7Ex2B {
public static int month(String s)
{
//ayżn integer indeksini verir 0..11 e 0:ocak

String month[]={"january","february","march","april","mmonth","june","july",
            "august","september","october","november","december"}; 
int i;
int j=-1;
for(i=0;i<12;i++)
{if(s.equals(month[i])) {j=i;break;}}             	
return j;
}

	 
public static void main(String args[] ) 
{ int the_day_of_the_month[]={31,28,31,30,31,30,31,31,30,31,30,31};	  
String s="The day of the month : \n"; 
String s2="april";
int i=month(s2);    
s+="Month "+s2+" s "+ayin_gunleri[i]+" days long \n"; 
String s1="Array example";
JOptionPane.showMessageDialog(null,s,s1,JOptionPane.PLAIN_MESSAGE); 
} 
}