
Java Core
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
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.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).

