Although it is rare, occasionally, you may want to call a subroutine that is written in a language other than Java. Typically, such a subroutine exists as executable code for the C
Read tutorial ↗Java 2 adds a new keyword to the Java language, called strictfp. With the creation of Java 2, the floating point computation model was relaxed slightly to make certain floating poi
Read tutorial ↗Sometimes, knowing the type of an object during run time is useful. For example, you might have one thread of execution that generates various types of objects, and another thread
Read tutorial ↗Java defines two interesting type modifiers: transient and volatile. These modifiers are used to handle somewhat specialized situations.
Read tutorial ↗Java provides a number of classes and methods that allow you to read and write files. In Java, all files are byte-oriented, and Java provides methods to read and write bytes from a
Read tutorial ↗Although using System.out to write to the console is still permissible under Java, its use is recommended mostly for debugging purposes or for sample programs, such as those found
Read tutorial ↗You are probably attempting to install the Java 2 Runtime Environment, Standard Edition (JRE) or the JDK 1.4.xx version in your Windows server. But alas, a message box with the fol
Read tutorial ↗To read a string from the keyboard, use the version of readLine() that is a member of the BufferedReader class. Its general form is shown here:
Read tutorial ↗Each time that read() is called, it reads a character from the input stream and returns it as an integer value. It returns –1 when the end of the stream is encountered.
Read tutorial ↗A special type of error that you need to avoid that relates specifically to multitasking is deadlock, which occurs when two threads have a circular dependency on a pair of synchron
Read tutorial ↗To avoid polling, Java includes an elegant interrocess communication mechanism via the wait(), notify(), and notifyAll() methods. These methods are implemented as final methods in
Read tutorial ↗Synchronization is easy in Java, because all objects have their own implicit monitor associated with them. To enter an object's monitor, just call a method that has been modified w
Read tutorial ↗