<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java Interview Questions &#187; String Class</title>
	<atom:link href="http://www.bestjavainterviewquestions.com/category/java-important-notes/string-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bestjavainterviewquestions.com</link>
	<description>Java Interview Questions &#124; Core Java Interview Questions &#124; Advanced Java Interview Questions &#124; EJB Interview Questions &#124; J2EE Interview Questions &#124; Hibernate Interview Questions</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Difference between String and StringBuffer</title>
		<link>http://www.bestjavainterviewquestions.com/difference-between-string-and-stringbuffer/</link>
		<comments>http://www.bestjavainterviewquestions.com/difference-between-string-and-stringbuffer/#comments</comments>
		<pubDate>Sun, 24 Aug 2008 14:13:45 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[String Class]]></category>
		<category><![CDATA[string and stringbuffer]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=198</guid>
		<description><![CDATA[Q) what is the difference between String and StringBuffer? A) &#8211;&#62;String class objects are Immutable. &#8211;&#62;StringBuffer objects are mutable. Why String objects are Immutable: Click this JVM to know the defination(other def)    takes less time to create a new String object than to Re allocate memory to the existing object and modify its contents it [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Q) what is the difference between String and StringBuffer?</strong></p>
<p><strong>A) </strong></p>
<p><strong>&#8211;&gt;</strong>String class objects are Immutable.</p>
<p><strong>&#8211;&gt;</strong>StringBuffer objects are mutable.</p>
<p><strong>Why String objects are Immutable:</strong></p>
<p><strong><span class="alignleft">Click this </span><a class="alignleft" title="Java Virtual Machine" href="http://computerpreferedcourses.blogspot.com/2008/08/defining-jvmjava-virtual-machine.html" target="_blank">JVM</a><span class="alignleft"> </span> </strong> <strong><span class="alignleft">to know the defination</span></strong>(other <a class="wp-caption" title="jvm" href="http://computerpreferedcourses.blogspot.com/2008/08/jvm-java-virtual-machine.html" target="_blank">def</a>)    takes less time to create a new String object than to Re allocate memory to the existing object and modify its contents it will take more memory so it will create a new object.</p>
<p><strong><span style="text-decoration: underline;">Mutable Objects</span> : </strong>The objects whose data can be modified are called mutable objects.</p>
<p>once we use the value we can modify it is called mutable.</p>
<p><span style="text-decoration: underline;"><strong>Immutable objects</strong></span> : Immutable objects are those objects whose contents can&#8217;t be modified</p>
<p>once you create an Input and Output we can&#8217;t change the content object</p>
<p>String class objects are Immutable.</p>
<p><strong></strong>String Class does&#8217;t contain methods which directory manipulate the object contents but StringBuffer class has such methods</p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li>December 10, 2008 -- <a href="http://www.bestjavainterviewquestions.com/what-is-thread-synchronization/" title="What is Thread Synchronization">What is Thread Synchronization</a> (1)</li><li>March 20, 2009 -- <a href="http://www.bestjavainterviewquestions.com/life-cycle-of-stateless-session-bean/" title="Life Cycle of stateless session bean">Life Cycle of stateless session bean</a> (0)</li><li>August 15, 2008 -- <a href="http://www.bestjavainterviewquestions.com/thread-example-for-runnable-interface/" title="Thread example for Runnable Interface">Thread example for Runnable Interface</a> (1)</li><li>September 17, 2008 -- <a href="http://www.bestjavainterviewquestions.com/example-of-hibernate/" title="Example of Hibernate">Example of Hibernate</a> (0)</li><li>September 22, 2008 -- <a href="http://www.bestjavainterviewquestions.com/explain-java-main-method/" title="Explain Java Main Method.">Explain Java Main Method.</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/difference-between-string-and-stringbuffer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

