Run time errors in java:
Attempt to invoke an object which is null or a variable which has not any value-NullPointerException.
Ran out of memory-OutOfMemoryError
Trying to open a file that does not exist-FileNotFoundError
Trying to pass argument to a method which are not within the accepted bounds-IllegalArgumentException
Trying to invoke a start() method on a dead thread.
Trying to invoke wait() or notify() on an object without owing the objects monitor-IllegealMonitorStateException
Compile time errors in java:
A class tries to invoke more than one class
Overloading or overriding is not implemented correctly.
Declare two class members in a same name.
Trying to create an instance of an instance class.
Trying to change the value of a final type variable which is already initialized.
Attempt to refer to a variable that is not into the scope of the current block.
That was a simple demonstration about the two types of common errors in java.This sort of problem not much bigger at the very beginning but sooner this will become your headache .So try to learn from the basics then go for advance.
You guys can read my blog on oop in java here: https://shakilpy.wixsite.com/sakhawat/blog/java-oop-basics
Finding a bug and solve it means you made your day.
Comments