In this tutorial we will discuss about the System class in Java. It contains a number of useful fields, such as the standard input, the standard output and the standard error streams. The System class is declared as final and thus, it cannot be instantiated. Also, the System class contains a large number of methods that can be used to ...
Read More »Home » Archives for Sotirios-Efstathios Maneas »
java.lang.VerifyError – How to solve VerifyError
In this tutorial we will discuss about the VerifyError in Java. This error indicates that the verifier, included in the Java Virtual Machine (JVM), detected a class file that despite well formed, it contains some type of internal inconsistency or faces a security problem. The VerifyError class extends the LinkageError class, which is used to indicate those error cases, where ...
Read More »java.io.EOFException – How to solve EOFException
In this tutorial we will discuss about the EOFException in Java. This exception indicates the the end of file (EOF), or the end of stream has been reached unexpectedly. Also, this exception is mainly used by DataInputStreams, in order to signal the end of stream. However, notice that other input operations may return a special value upon the end of ...
Read More »java.lang.IllegalMonitorStateException – How to solve IllegalMonitorStateException
In this tutorial we will discuss about the IllegalMonitorStateException in Java. This exception, when thrown, indicates that the calling thread has attempted to wait on an object’s monitor, or has attempted to notify other threads that wait on an object’s monitor, without owning the specified monitor. The IllegalMonitorStateException extends the RuntimeException class and thus, belongs to those exceptions that can ...
Read More »java.lang.StackOverflowError – How to solve StackOverflowError
The java.lang.stackoverflowerror – StackOverflow Error in Java is thrown to indicate that the application’s stack was exhausted, due to deep recursion. The StackOverflowError extends the VirtualMachineError class, which indicates that the JVM is broken, or it has run out of resources and cannot operate. Furthermore, the VirtualMachineError extends the Error class, which is used to indicate those serious problems that ...
Read More »java.lang.OutOfMemoryError – How to solve OutOfMemoryError
In this example we will discuss about OutOfMemoryError in Java. This error is thrown by the Java Virtual Machine (JVM) when an object cannot be allocated due to lack of memory space and also, the garbage collector cannot free some space. The OutOfMemoryError objects are created by the JVM when suppression is disabled and/ir the stack trace is not writable. ...
Read More »java.net.BindException – How to handle BindException
In this example we will discuss about BindException in Java. This exception is thrown to indicate that an error occurred when an application attempts to bind a socket to a local address and port. The main cause of this exception is that either the port is already in use, or the requested address cannot be assigned to the calling application. ...
Read More »java.lang.InterruptedException – How to handle InterruptedException
In this example we will discuss about InterruptedException in Java. This exception is thrown when a thread is interrupted. The thread could be in either waiting, sleeping or running state and this exception can be thrown either before or during a thread’s activity. This exception extends the Exception class and thus, can be classified as a checked exception. Checked exceptions ...
Read More »java.lang.UnsupportedOperationException – How to handle UnsupportedOperationException
In this tutorial we will discuss about UnsupportedOperationException in Java. This exception is thrown to indicate that the requested operation is not supported. This exception extends the RuntimeException class and thus, belongs to those exceptions that can be thrown during the operation of the Java Virtual Machine (JVM). It is an unchecked exception and thus, it does not need to ...
Read More »java.util.NoSuchElementException – How to solve NoSuchElementException
In this tutorial, we will discuss about the java.util.nosuchelementexception in Java. This exception is thrown to indicate that there are no more elements in an enumeration. This exception extends the RuntimeException class and thus belongs to those exceptions that can be thrown during the operation of the Java Virtual Machine (JVM). It is an unchecked exception and thus, it does ...
Read More »