top of page
Search
Writer's pictureShakil

Java Runtime vs Compile time error

Run time errors in java:

  1. Attempt to invoke an object which is null or a variable which has not any value-NullPointerException.

  2. Ran out of memory-OutOfMemoryError

  3. Trying to open a file that does not exist-FileNotFoundError

  4. Trying to pass argument to a method which are not within the accepted bounds-IllegalArgumentException

  5. Trying to invoke a start() method on a dead thread.

  6. Trying to invoke wait() or notify() on an object without owing the objects monitor-IllegealMonitorStateException

Compile time errors in java:

  1. A class tries to invoke more than one class

  2. Overloading or overriding is not implemented correctly.

  3. Declare two class members in a same name.

  4. Trying to create an instance of an instance class.

  5. Trying to change the value of a final type variable which is already initialized.

  6. 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.
3 views0 comments

Recent Posts

See All

コメント


bottom of page