<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2506332937270291573</id><updated>2024-09-22T12:44:04.990-07:00</updated><category term="Core Java"/><category term="Interview Qs"/><category term="Arrays"/><category term="Comparison"/><category term="DBMS"/><category term="Differences"/><category term="JSP"/><category term="Java"/><category term="MySQL"/><category term="Oracle"/><category term="Servlet"/><category term="Strings"/><category term="Tomcat"/><title type='text'>Java FAQs</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-6697798225317335327</id><published>2008-03-28T07:39:00.001-07:00</published><updated>2008-04-04T22:20:35.746-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Comparison"/><category scheme="http://www.blogger.com/atom/ns#" term="Differences"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Strings"/><title type='text'>Difference between String, StringBuffer, StringBuilder</title><content type='html'>&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;br /&gt;&lt;b&gt;String&lt;/b&gt;:  String is immutable.  You can&#39;t change a string object once after you created it.  The methods in String class which appear to be changing string object are actually return a new object.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;StringBuffer&lt;/b&gt;:  StringBuffer is mutable.  You can change it without creating new object.  Use it when you have to modify your string a lot.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;StringBuilder&lt;/b&gt;:  StringBuilder is introduced in Java SE 5.0.  It is same as StringBuffer in functionality.  But it doesn&#39;t have its methods synchronized, whereas StringBuffer has synchronized methods.  When you don&#39;t need thread safety for your strings use StringBuilder, it will be little fast as you don&#39;t need to get locks unnecessarily.  Most of the time you don&#39;t need synchronized methods.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/6697798225317335327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/6697798225317335327' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/6697798225317335327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/6697798225317335327'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2008/03/difference-between-string-stringbuffer.html' title='Difference between String, StringBuffer, StringBuilder'/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-5883651351366420545</id><published>2008-02-07T02:30:00.000-08:00</published><updated>2008-02-07T02:32:26.030-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JSP"/><category scheme="http://www.blogger.com/atom/ns#" term="Servlet"/><category scheme="http://www.blogger.com/atom/ns#" term="Tomcat"/><title type='text'>Specs work in each Tomcat version</title><content type='html'>&lt;p&gt;Different versions of Apache Tomcat are available for different versions of the Servlet and JSP specifications. The mapping between the specifications and the respective Apache Tomcat verisons is:&lt;/p&gt;    &lt;table class=&quot;detail-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;   &lt;td bg valign=&quot;top&quot; style=&quot;color:#039acc;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt; &lt;strong&gt;Servlet/JSP Spec&lt;/strong&gt; &lt;/span&gt; &lt;/td&gt;   &lt;td bg valign=&quot;top&quot; style=&quot;color:#039acc;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt; &lt;strong&gt;Apache Tomcat version&lt;/strong&gt; &lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;2.5/2.1&lt;/span&gt; &lt;/td&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;6.0.x&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;2.4/2.0&lt;/span&gt; &lt;/td&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;5.5.x&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;2.3/1.2&lt;/span&gt; &lt;/td&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;4.1.x&lt;/span&gt; &lt;/td&gt; &lt;/tr&gt;  &lt;tr&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;2.2/1.1&lt;/span&gt; &lt;/td&gt;   &lt;td align=&quot;left&quot; bg valign=&quot;top&quot; style=&quot;color:#a0ddf0;&quot;&gt; &lt;span style=&quot;font-family:arial,helvetica,sanserif;font-size:-1;color:#000000;&quot;&gt;3.3.x&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;</content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/5883651351366420545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/5883651351366420545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/5883651351366420545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/5883651351366420545'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2008/02/specs-work-in-each-tomcat-version.html' title='Specs work in each Tomcat version'/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-996925366226105777</id><published>2008-01-17T22:06:00.000-08:00</published><updated>2008-01-17T22:31:52.132-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DBMS"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><title type='text'>Loading data from a file into a table</title><content type='html'>How to import data from a file to a table&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;in Oracle&lt;/span&gt;&lt;br /&gt;You have to use sqlldr utility to import data from an external file into a table, you can&#39;t do from sql plus.&lt;br /&gt;&lt;br /&gt;First you have to create a control file, a data file.  Control file should be like this&lt;br /&gt;&lt;br /&gt;LOAD DATA&lt;br /&gt;INFILE data file name&lt;br /&gt;APPEND INTO TABLE table name&lt;br /&gt;FIELDS TERMINATED BY &#39;separator&#39;&lt;br /&gt;(columns list)&lt;br /&gt;&lt;br /&gt;Separator is the character which separates the column values in the data file.&lt;br /&gt;Ex:&lt;br /&gt;LOAD DATA&lt;br /&gt;INFILE &#39;C:\data.txt&#39;&lt;br /&gt;APPEND INTO TABLE ac_mt&lt;br /&gt;FIELDS TERMINATED BY &#39;,&#39;&lt;br /&gt;(acname, mtname)&lt;br /&gt;&lt;br /&gt;Next call the sqlldr from command prompt and give it control file.&lt;br /&gt;&lt;br /&gt;Syntax:  sqlldr control=&#39;control file name&#39; log=&#39;log file name&#39; bad=&#39;bad file name&#39;&lt;br /&gt;Any rows which are not imported will be placed into bad file.  Details will be logged into the log file.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://www.orafaq.com/faqloadr.htm&quot;&gt;Read more here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;in MySQL&lt;/span&gt;&lt;br /&gt;you can give the same command directly or you  can use &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html&quot;&gt;mysqlimport &lt;/a&gt;utility.&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/load-data.html&quot;&gt;Read more here&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/996925366226105777/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/996925366226105777' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/996925366226105777'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/996925366226105777'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2008/01/loading-data-from-file-into-table.html' title='Loading data from a file into a table'/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-876875156807913533</id><published>2008-01-17T21:24:00.000-08:00</published><updated>2008-01-17T21:50:54.735-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Arrays"/><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><title type='text'>Anonymous arrays in Java</title><content type='html'>Anonymous arrays are similar to anonymous classes in Java.  Both don&#39;t have a name, so called anonymous.  If you need to create an array to use only once, then you can create an anoymous array without assigning it to any variable.&lt;br /&gt;&lt;br /&gt;Syntax:  new int[] ( 15, 32, 20)&lt;br /&gt;&lt;br /&gt;Just define the array needed followed by the keyword new.  No need to specify a size, as you are assigning values to the array immediately.&lt;br /&gt;&lt;br /&gt;For example, you need to pass an array to a function, and you don&#39;t use it anywhere else then you can do as following.&lt;br /&gt;&lt;br /&gt;Ex:  void fun( grade, new String[] (&quot;Pass&quot;, &quot;Fail&quot;) )</content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/876875156807913533/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/876875156807913533' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/876875156807913533'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/876875156807913533'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2008/01/anonymous-arrays-in-java.html' title='Anonymous arrays in Java'/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-6253127530680967308</id><published>2007-12-07T22:27:00.000-08:00</published><updated>2007-12-07T22:50:08.261-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Interview Qs"/><title type='text'>Interview - 2</title><content type='html'>&lt;p class=&quot;MsoNormal&quot;&gt;1.    What is the output of the following program?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;        int b=’A’;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;        System.out.println(b);&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;A)  65    B)  A    C)  Compile Time Error    D)  Runtime Error&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;2.    What is the output of the following program?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 0.5in;&quot;&gt;String a=new String(&quot;Reddy&quot;);&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 0.5in;&quot;&gt;StringBuffer b=new StringBuffer(&quot;Reddy&quot;);&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 0.5in;&quot;&gt;System.out.println(a.equals(b));&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 0.5in;&quot;&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;A)  true    B)  false    C)  Compile Time Error    D)  Runtime Error&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;3.    What is the output of the following program?&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 0.5in;&quot;&gt;String a=&quot;Reddy&quot;;&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 0.5in;&quot;&gt;a.toUpperCase();&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;text-indent: 0.5in;&quot;&gt;System.out.println(a);&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt; &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot; style=&quot;margin-left: 0.5in; text-indent: -0.5in;&quot;&gt;A)        REDDY                      B)        Reddy             C)        Compile Time Error                D)Runtime Error&lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;4.         Which of the following declarations are wrong?&lt;/p&gt;  &lt;p class=&quot;MsoListParagraphCxSpFirst&quot; style=&quot;margin-left: 0in; text-indent: 0in;&quot;&gt;            i.    final public class test{}&lt;/p&gt;  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 0in; text-indent: 0in;&quot;&gt;            ii.    abstract public class test{}&lt;/p&gt;  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 0in; text-indent: 0in;&quot;&gt;            iii.    protected abstract class test{}&lt;/p&gt;  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 0in; text-indent: 0in;&quot;&gt;            iv.    public static interface test{}&lt;/p&gt;  &lt;p class=&quot;MsoListParagraphCxSpMiddle&quot; style=&quot;margin-left: 0in; text-indent: 0in;&quot;&gt;            v.    final static interface test{}&lt;/p&gt;  &lt;p class=&quot;MsoListParagraphCxSpLast&quot; style=&quot;margin-left: 0in;&quot;&gt; &lt;/p&gt;  &lt;p class=&quot;MsoNormal&quot;&gt;A)        iii &amp;amp; iv             B)        iv &amp;amp; v              C)        i &amp;amp; ii &amp;amp; v                     D)        iii &amp;amp; v&lt;/p&gt;&lt;p class=&quot;MsoNormal&quot;&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/6253127530680967308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/6253127530680967308' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/6253127530680967308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/6253127530680967308'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2007/12/interview-2.html' title='Interview - 2'/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-3837191712772291260</id><published>2007-11-25T06:33:00.001-08:00</published><updated>2007-12-07T22:50:56.602-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Interview Qs"/><title type='text'>Interview - 1</title><content type='html'>&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;What is the super class of Exception?&lt;/span&gt;&lt;br&gt;&lt;br&gt;Throwable&lt;br&gt;&lt;br&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;What is the main controller component in Struts framework?&lt;/span&gt;&lt;br&gt;&lt;br&gt;ActionServlet &lt;br&gt;&lt;br&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;What is a marker Interface?&lt;/span&gt;&lt;br&gt;&lt;br&gt;Marker Interface is an empty interface which is used to indicate something to the compiler.&amp;nbsp; For example if you are implementing &amp;#39;Serializable&amp;#39; marker interface you are indicating that the object can be converted into bytes. &lt;br&gt;&lt;br&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;Can you call doPost method from doGet ?&lt;/span&gt;&lt;br&gt;&lt;br&gt;yes&lt;br&gt;&lt;br&gt;&lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/3837191712772291260/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/3837191712772291260' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/3837191712772291260'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/3837191712772291260'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2007/11/interview-1.html' title='Interview - 1'/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-740125453834796783</id><published>2007-11-24T07:53:00.001-08:00</published><updated>2007-12-07T22:50:56.602-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><title type='text'></title><content type='html'>&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;What is the difference between final, finally and finalize?&lt;br&gt;&lt;br&gt;&lt;b&gt;&lt;font color=&quot;#330033&quot;&gt;final&lt;/font&gt;&lt;/b&gt;&lt;font color=&quot;#330033&quot;&gt;:&amp;nbsp; final is a keyword used to create constants and non-inheritable classes.&amp;nbsp; If final is used with a variable, some value should be assigned to that variable, and that value can&amp;#39;t be changed again.&amp;nbsp; If final is used for classes, you can&amp;#39;t extend those classes. &lt;br&gt;&lt;br&gt;&lt;b&gt;finally:&lt;/b&gt;&amp;nbsp; finally is used with try...catch block.&amp;nbsp; finally is a block of statements which executes nevertheless the exception occurred or not.&amp;nbsp; If exception occurs execution will come to catch block, executes the necessary statements then comes to finally block.&amp;nbsp; If exception doesn&amp;#39;t occur then try block will be executed fully, then execution comes to finally block.&amp;nbsp; This finally block was commonly used to cleanup any resources held. &lt;br&gt;&lt;br&gt;&lt;b&gt;finalize:&lt;/b&gt;&amp;nbsp; finalize is a method which will be called before the object is garbage collected.&amp;nbsp; Garbage collector will call this method once, before it reclaims the memory of the object.&amp;nbsp; So, any cleanup code will be put in the finalize block. &lt;br&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt; </content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/740125453834796783/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/740125453834796783' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/740125453834796783'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/740125453834796783'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2007/11/what-is-difference-between-final.html' title=''/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-2949666203852249279</id><published>2007-11-21T04:58:00.001-08:00</published><updated>2007-12-07T22:50:56.602-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><title type='text'></title><content type='html'>&lt;br&gt;&lt;span style=&quot;color: rgb(0, 102, 0);&quot;&gt;Can we serialize the static variables?&lt;/span&gt;&lt;br&gt;&lt;br&gt;No.&amp;nbsp; Since serialization is the process of converting object&amp;#39;s state into bytes so that the object can be sent across network or stored to the physical storage media (like hard disk) for later retrieval.&amp;nbsp; Since static variables are not associated with any object (specific instance), they can&amp;#39;t be serialized.&amp;nbsp;  &lt;br&gt;&lt;br&gt;So, serialization is associated with objects, static members are associated with class not an object.&lt;br&gt;&lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/2949666203852249279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/2949666203852249279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/2949666203852249279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/2949666203852249279'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2007/11/can-we-serialize-static-variables-no.html' title=''/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-1193701292195818735</id><published>2007-10-23T09:20:00.001-07:00</published><updated>2007-12-07T22:50:56.603-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><title type='text'></title><content type='html'>&lt;span style=&quot;color: rgb(0, 102, 0); font-weight: bold;&quot;&gt;What is the Difference between Checked and Unchecked exceptions?&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Checked exceptions are instances of Exception class or its subclasses.&amp;nbsp; Unchecked exceptions are instances of either Error class, Runtime Exception or its subclasses.&amp;nbsp; We have to catch and handle the checked exceptions, or declare that we can&amp;#39;t handle that exception.&amp;nbsp; Compiler will check that we have done one of the two things. So, they are called checked exceptions.  &lt;br&gt;&lt;br&gt;The reason for this is that Errors are occur by conditions outside of the application. and Runtime Exceptions are occur by wrong programming logic.&amp;nbsp; We can&amp;#39;t handle these exceptional conditions without stopping the application.&amp;nbsp; So, compiler will not ask you to catch or declare these types of exceptions, even though you can choose to do catch or declare. &lt;br&gt;&lt;br&gt;&lt;br&gt;Even when you are creating your own exception classes, you have to remember the intentions of checked exceptions, and unchecked exception classes.&amp;nbsp; &lt;br&gt;&lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/1193701292195818735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/1193701292195818735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/1193701292195818735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/1193701292195818735'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2007/10/what-is-difference-between-checked-and.html' title=''/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2506332937270291573.post-5733535421590988471</id><published>2007-09-09T03:33:00.001-07:00</published><updated>2007-09-09T04:26:36.105-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Core Java"/><title type='text'></title><content type='html'>&lt;span style=&quot;font-weight: bold; color: rgb(0, 102, 0);&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;What is the difference between JVM, JRE, and JDK?&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;/span&gt;Java Virtual Machine interprets and executes the java application. &lt;br&gt; Java Runtime Environment provides JVM with library classes used in the program and other supporting files.&lt;br&gt; Java Developer Kit provides tools to the developers to develop applications in java.&lt;br&gt; &lt;br&gt; JVM is responsible for all things like garbage collection, array bounds checking, etc...&lt;br&gt; &lt;br&gt; </content><link rel='replies' type='application/atom+xml' href='http://jfaqs.blogspot.com/feeds/5733535421590988471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/2506332937270291573/5733535421590988471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/5733535421590988471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2506332937270291573/posts/default/5733535421590988471'/><link rel='alternate' type='text/html' href='http://jfaqs.blogspot.com/2007/09/what-is-difference-between-jvm-jre-and.html' title=''/><author><name>Reddy</name><uri>http://www.blogger.com/profile/12162711387567481083</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>