Hi all,
I've got a simple app that reserves seats on a plane, but i've got some sort of a syntax issue. My IDE (Eclipse) tells me that i have braces/brackets issue, but i can't find where exactly the problem is. They all seem to line up and be in the right places, yet it won't compile.

Could someone check my syntax (braces) and see what is wrong as I must be blind, since i can't find the problem....

Code:
import java.util.Scanner;

public class Reservation 
{
	boolean seats[]= new boolean[10];
	int seat=0;
	int seatnotfound = -1;
	int start=0; 
	int end=0;

	public static void main(String[] args)
	{ // this is the first Eclipse is complaining about
	
	
		public int search(int seatingclass)
		{
			if (seatingclass==1)
			{
				start=0;
				end=4;
			} else 
			{
				start=5;
				end=9;
			}
			for (int i=start;i<=end;i++) 
			
				if (seats[i]==false) 
				{
					seats[i]=true;
					return (i);  
				}
		
	
			return (seatnotfound);
		}
	} //this is second Eclipse is complaining about
	System.out.println ("Enter 1 for first class or 2 for Economy");
	System.in.readln(classin);
	seat=search(classin);
	if (seat==seatnotfound) 
		{
		System.out.println("Okay to check other class?");
		System.in.readln(okayin);
		if (okayin=="y") 
			{
			if (classin==1)
				classin=2;
			else
				classin=1;
			seat=search(classin);
			if (seat==seatnotfound) 
				{
				System.out.println("Next flight leaves at 3pm");
				return;
				}
			else 
				{
				System.out.println("Assigned Seat",seat);
				return;
				}	
			}
		System.out.println("Next flight leaves at 3pm");
		return;
		}
 	System.out.println("Assigned Seat",seat);
	}
}