admin

admin

Multithreaded Programming

Multithreaded Fundamentals Process vs Thread Thread States The Thread Class and Runnable Interface Java’s multithreading system is built upon the Thread class, its methods, and its companion interface, Runnable. Thread encapsulates a thread of execution. Since you can’t directly refer to the ethereal state…

Using I/O

Java’s I/O is Built upon Streams Byte Streams and Character Streams The Byte Stream Classes The Character Stream Classes The Predefined Streams Using the Byte Streams Let’s explore FileInputStream and FileOutputStream by examining an example program named ByteStreamExample, which uses byte streams to copy test.txt, one…

Exception Handling

Exceptions are a mechanism used by many programming languages to describe what to do when something unexpected happens.  Typically, something unexpected is an error of some sort, for example when a method is invoked with unacceptable arguments, or a network…