Menu

Close
  • Home
  • Algorithm
  • Java
  • Python
  • Machine Learning
  • Productivity
  • Author
  • About
Subscribe
Blog Logo Menu

Java

Old but good.

Page 1 of 1

Why nonfair lock is faster than fair lock

This is the nonfair scenario: When a thread B asks to hold a lock, if the lock is already taken by another thread A. Then the... »

Author image Kewei Shang on Java 29 Nov 2016

How the compiler understands your Java class

I have the following static factory method that creates a list view out of an int array: public class ListFactory { public static List<Integer> newInstance(final int[]... »

Author image Kewei Shang on Java 07 Apr 2016

Caveat! JVM cannot check a generic cast at runtime

The Java Generics is based on Erasure, which means the type check is only done at compile time, and at runtime the type information is erased.... »

Author image Kewei Shang on Java 05 Jan 2016

Where are variables stored in Java, Stack or Heap?

A primitive variable “holds” directly his value itself. Examples of a primitive variable : int i, long l; A reference variable “holds” the reference (4 bytes... »

Author image Kewei Shang on Java 02 Dec 2012

How object in Java is initialized

It’s important and fun to understand how exactly one object is initialized in Java. A class is loaded when it is used for the first time,... »

Author image Kewei Shang on Java 01 Jul 2012
Page 1 of 1
7 a.m. in the morning © 2017