How Static Type Checking Works in Java?

From Wiki: Static type-checking is the process of verifying the type safety of a program based on analysis of a program’s source code. Dynamic type-checking is the process of verifying the type safety of a program at runtime Java uses static type checking to analyze the program during compile-time to prove the absence of type … Read more

Java and Computer Science Courses

A good programmer does not only know how to program a task, but also knows why it is done that way and how to do it efficiently. Indeed, we can find almost any code by using Google, knowing why it is done that way is much more difficult than knowing how to do it, especially … Read more

Comparable vs. Comparator in Java

Comparable and Comparator are two interfaces provided by Java Core API. From their names, we can tell they may be used for comparing stuff in some way. But what exactly are they and what is the difference between them? The following are two examples for answering this question. The simple examples compare two HDTV’s size. … Read more

How an IP-PDU is sent from one host to another

This shows how a host sends a IP-PDU(Protocol Data Unit) to a host in another network. Mainly about how an IP-PDU goes through Network and Link Layers. It demonstrate how switch table, ARP table, routing table and forwarding table works with each other in the whole process. Click to download the diagram. This diagram is … Read more

Monitors – The Basic Idea of Java Synchronization

If you took operating system course in college, you might remember that monitor is an important concept of synchronization in operating systems. It is also used in Java synchronization. This post uses an analogy to explain the basic idea of “monitor”. 1. What is a Monitor? A monitor can be considered as a building which … Read more