Ques:What is meant by strings are immutable in java?
Ans: Immutable means that once an object of that Class has been created it can't be altered.
This is useful as it means you can pass references to the object around, without worrying that someone else is going to change it's contents.
Why String is immutable?
If they were mutable then there would be no String pool implementation and the performance gains of the String pool become lost.
Ques: What is the difference between Spring and Spring-MVC.
Ans: Spring is composed of three parts:
Spring dependency,spring mvc,Spring AOP
Spring-MVC is itself part of the Spring.Spring mvc is basically used for web applications.
Ans: Immutable means that once an object of that Class has been created it can't be altered.
This is useful as it means you can pass references to the object around, without worrying that someone else is going to change it's contents.
Why String is immutable?
If they were mutable then there would be no String pool implementation and the performance gains of the String pool become lost.
Ques: What is the difference between Spring and Spring-MVC.
Ans: Spring is composed of three parts:
Spring dependency,spring mvc,Spring AOP
Spring-MVC is itself part of the Spring.Spring mvc is basically used for web applications.
0 comments:
Post a Comment