Quantcast
Channel: JavaPins - Stories tagged with immutable
Browsing latest articles
Browse All 8 View Live
↧

Image may be NSFW.
Clik here to view.

Why String is immutable or 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 diffe...

View Article


Image may be NSFW.
Clik here to view.

Why String is immutable or final in Java

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...

View Article


Image may be NSFW.
Clik here to view.

Difference between String and String Buffer and in which situations we use them

String is immutable but StringBuffer is mutable. I think it will be more useful while passing into a method. StringBuffer can be used as reference object. If you change in method's logic it will be...

View Article

Image may be NSFW.
Clik here to view.

Why String has been made immutable in Java? | Geek Explains: Java, J2EE,...

Why String has been made immutable in Java? Though, performance is also a reason (assuming you are already aware of the internal String pool maintained for making sure that the same String object is...

View Article

Image may be NSFW.
Clik here to view.

StringBuffer versus String - JavaWorld

Java provides the StringBuffer and String classes, and the String class is used to manipulate character strings that cannot be changed. Simply stated, objects of type String are read only and...

View Article


Image may be NSFW.
Clik here to view.

Why is String immutable or final in Java? | I'd rather be coding

There could be many possible answers to this question, and only the original developer of the String class can provide the real answer. Below are some possible reasons that make sense: 1) StringPool...

View Article

Image may be NSFW.
Clik here to view.

Java Interviews - Core Java - Q2 - StringBuffer vs StringBuilder - Furikake...

Java Interviews - Core Java - Q2 - StringBuffer vs StringBuilder As part of my core Java interview preparation series, see: http://furikake.posterous.com/tag/corejavainterviewseries Q2) String Buffer...

View Article

Image may be NSFW.
Clik here to view.

Inspired by Actual Events: Immutable Collections, Guava-Style

My general preference is to use immutable classes and collections as often as possible. I have often used the Collections methods for returning unmodifiable collections. One drawback of the...

View Article

Browsing latest articles
Browse All 8 View Live