Java feature

  1. double brace
  2. ThreadLocal
  3. Instance Initializers
    public class Foo {
      public Foo() {
        System.out.println("constructor called");
      }
     
      static {
        System.out.println("static initializer called");
      }
     
      {
        System.out.println("instance initializer called");
      }
    }
    
  4. Enum – is a class
  5. try, finally, exception
    public static int f() {
        try {
          throw new RuntimeException();
        } finally {
          return 0;
        }
      }
    
  6. URL
    new URL("http://www.yahoo.com").equals(new URL("http://209.191.93.52"))
    

    =true

Multithreading in java

dzone

Multi-threading represents a very intriguing topic, even after years of research and development for high quality, robust, and efficient software. With equal emphasis on hardware improvements and the software that runs on it – we have newer paradigms for parallelism. The most important yet basic concepts are the ones which I present here. I then explain the intricacies of multi-threading in the Java programming language. Some of these are newer features and supported only from the Java Platform Standard Edition 5.0. Let us start with a quick overview and understanding of the core concepts.

Continue reading “Multithreading in java”