Articles
-
Strings In Java
Strings, which are widely used in Java programming, are a sequence of characters. “Java”, “aaa”, “123” and “A” are some examples of strings, which are all enclosed within the double quotes. In the Java programming language, strings are objects. The Java platform provides three classes: String, StringBuffer and StringBuilder to create and manipulate strings. In this reading note, I will talk about some important aspects of Java strings and the problems we often encounter.
-
Four Types Of References In Java
There are actually 4 kinds of reference types in Java: strong references, soft references, weak references and phantom references. These references are different because of the existence of a garbage collection mechanism in the JVM. The decision of reclaiming memory from the object heap depends not only on the fact that there are active references to an object, but also on the type of reference to the object. Let’s try to see how each of them differ from one another.
-
Java Exceptions
An Exception is an abnormal condition which occurs during run time and disrupts the normal flow of the program. Exceptions must be handled to maintain the normal flow of the program. In this reading note, I record some key points about the concepts, the handling methods and the frequently asked interview questions of Java Exception.