Thanks everyone for the time.One more doubt on this.
The above same program,but in the main method i changed like the below.
Q1 myQ=new Q();
System.out.println("class"+myQ.getClass());
myQ.priya();
//priya() method should take runtimeBinding and displays xxxx.
myQ.getclass also displaying class Q.then why do we need to declare Exception in mainmethod.I thought we needed to declare EOFException since Q class priya() method is executing.
i am looking for the rules behind this .please help me again.
[ November 09, 2006: Message edited by: Shiva Mohan ]