Java Core

TwitterFacebook
Get flash to fully experience Pearltrees
This is one of the most popular interview question on String in Java which starts with discussion of What is immutable object , what are the benefits of immutable object , why do you use it and which scenarios do you use it. This is some time also asked as "Why String is final in Java" . It can also come once interviewee answers some preliminarily strings questions e.g. What is String pool , What is the difference between String and StringBuffer , What is the difference between StringBuffer and StringBuilder etc.

Why String is immutable in Java

http://javarevisited.blogspot.com/2010/10/why-string-is-immutable-in-java.html

Why use inner classes in java

So what are inner classes good for anyway? Believe it or not, there are advantages to Java's inner classes. But before we go into that, I'll provide a short background on inner classes. Inner classes nest within other classes. A normal class is a direct member of a package, a top-level class. http://www.javaworld.com/javaworld/javaqa/2000-03/02-qa-innerclass.html
http://docs.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html Year: For formatting, if the number of pattern letters is 2, the year is truncated to 2 digits; otherwise it is interpreted as a number . For parsing, if the number of pattern letters is more than 2, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D. For parsing with the abbreviated year pattern ("y" or "yy"), SimpleDateFormat must interpret the abbreviated year relative to some century. It does this by adjusting dates to be within 80 years before and 20 years after the time the SimpleDateFormat instance is created.

SimpleDateFormat

In the Java programming language , source files (.java files) are compiled into (virtual) machine-readable class files which have a .class extension. Since Java is a platform-independent language, source code is compiled into an output file known as bytecode , which it stores in a .class file. If a source file has more than one class, each class is compiled into a separate .class file. These .class files can be loaded by any Java Virtual Machine (JVM).

Java class file - Wikipedia, the free encyclopedia

http://en.wikipedia.org/wiki/Java_class_file