1. How many ways you can create a new thread ? Ans: There is exactly one way to create a new thread in Java and that is to instantiate java.lang.Thread .To actually run that thread you must call start(). There are two different ways to specify which code to run in that Thread: Implement the interface java.lang.Runnable and pass an instance of the class implementing it to the Thread constructor. Extend Thread itself and override its run() method. More details available here . 2.What is variable hiding and shadowing? Ans: Different kinds of variables have different scopes. A variable is shadowed if there is another variable with the same name that is closer in scope. In other words, referring to the variable by name will use the one closest in scope , the one in the outer scope is shadowed. A Local Variable Shadows An Instance Variable Inside a class method, when a local variable have the same name as one of the instance variable, the local variable shadows the instan