Sponsored Links
Ad by Google
Well immutable is very popular in java, and of course one of the popular interview topic, In our previous post we have seen an example of How to create an immutable class. In interview sometimes interviewer also ask you to "Can you list down few immutable class in java api?" or What are the immutable classes you ever used from java classes, as we have already seen Why String is immutable now time to see some example of immutable classes in java api. And of course in this post we are going to list down few very popular immutable classes in java.
Friends, I have listed few popular immutable classes here, and if you used some other, than above list you can post that immutable class as in comment. I will add that to the list, So that, it will help someone.
Few very popular java interview questions:
Which Collection is better to store 10 millions of record between ArrayList and LinkedList?
Create your own ArrayList or Design your own ArrayList?
How many ways to iterate HashMap in java
What are the key differences between Comparable and Comparator.
Serializable vs Externalizable
Can you list down the methods of java.lang.Object class
How many ways to create Object in java
Java Program to find all missing numbers from an Array
What is the different between ArrayList and LinkedList?
Why hash code method in java?
Example of immutable classes in java api
Below are the few very popular built in immutable classes.- java.lang.String (Very popular:))
- java.lang.Double
- java.lang.Long
- java.lang.Float
- java.lang.Integer
- java.lang.Short
- java.lang.Byte
- java.lang.Boolean
- java.util.UUID
- java.lang.Character
- java.math.BigInteger
- java.util.Locale
- java.awt.Font
- java.net.URL
Friends, I have listed few popular immutable classes here, and if you used some other, than above list you can post that immutable class as in comment. I will add that to the list, So that, it will help someone.
Few very popular java interview questions:
Which Collection is better to store 10 millions of record between ArrayList and LinkedList?
Create your own ArrayList or Design your own ArrayList?
How many ways to iterate HashMap in java
What are the key differences between Comparable and Comparator.
Serializable vs Externalizable
Can you list down the methods of java.lang.Object class
How many ways to create Object in java
Java Program to find all missing numbers from an Array
What is the different between ArrayList and LinkedList?
Why hash code method in java?
Sponsored Links
0 comments:
Post a Comment