Thursday, July 12, 2012

java


Core Java Mind Refresher


  • What are wrapped classes?
  • To what value is a variable of the String type automatically initialized?
  • Will it be empty string or null value? The default value of a String type is null.
  • What is the difference between static and non-static variables? A static variable is associated with the class. Non-static variables with each object instance.
  • What is the Set interface? The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.
  • How can a dead thread be restarted? A dead thread cannot be restarted.
  • Can an abstract class be final? An abstract class may not be declared as final.
  • What modifiers may be used with a top-level class? A top-level class may be public, abstract, or final.
  • How are ‘this’ and ‘super’ used? This is used to refer to the current object instance. super is used to refer to the variables and methods of the super class of the current object instance.
  • What was the package related to regular expressions in core java Java.util.regex
  • What is transient variable? Transient variable can't be serialized.
  • What exactly the property files contains Key and value pairs
  • which is better among interface and abstract class
  • Difference between interface and abstract class
  • types of exceptions, examples
  • final, finalize(), finally()
  • difference bt String s=”sar”; and String s=new String(“sar”);
  • Assertions
  • cohesion
  • coupling
  • what is and how to create a Singleton class
  • how to create a user defined Exception
  • String s=”abc”;
  • what is String? What is s? what is “abc”
  • what is immutable importance of string?
  • what is comparable and comparator?

No comments:

Post a Comment