I joined CTC in feb-2009 and went for first trek with them at Nagalapuram, near AP and TN boarder on 8th-march. What was the day...i will always remember the day. Fist time I dive from 10 feet hill and without knowing diving.
read more here
> 2 : Runtime Errors......
When the JAVA interpreter encounters an error during runtime it throws an exception and prints a stack trace showing the call stack -the list of methods called from the main program untill the statement that caused the exception.
I am taking an example to clear concept....
:> class RunTimeTest{
public static void main(String arg[]){
String s = "Hello World";
System.out.println(s.substring(10,12);
}
}
Generated Error as:
Exception in thread "main"
java.lang.StringOutBoundException:
String index out of range: 12
at java.lang.String.substring(Unknown source)
at RunTimeTest.main(RunTimeTest.java:4)
other kind of runtime errors might also be possible are as....
> out of range :
> ArrayIndexOutOfRange
> StringIndexOutOfRange
> NullPointerException
> InputMismatchException
> IllegalFormatException
> NumberFormatException
> ArithmeticException : This exception will generate if we
divide any no. by Zero(0).
> outOfMemoryError
> StackOverFlowArea
> During execution of program sometimes we got error like
this : NoClassDefFoundError
> NoSuchMethodFoundError : main
this error is generated when we forget to write
public with main i.e.
void main(String arg[]){.....}
> 3 : Assignment and Equality......
> String equality
sometimes we forget to compared string with method "equals".
> Assignment of references ....
one important thing about assignment of references is
when we assign references it only assign reference not the content of object.
These are some common errors which I noticed from when I started programing in java.
QUEZZES && MGPT ......... 15 oct ------ 18 oct............