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 Generics is a feature introduced from JDK 5. It allows us to use type parameter when defining class and interface. It is extensively used in Java Collection framework. The type erasure concept is one of the most confusing part about Generics. This article illustrates what it is and how to use it. 1. A … Read more
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 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
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
Topics covered in Network class include application layer, transport layer, network layer, link layer.
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