<?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-7879263817955525601</id><updated>2024-10-18T00:00:32.407-07:00</updated><title type='text'>JAVA GEEKS</title><subtitle type='html'>javasolutions4all.blogspot.in includes all the data and metadata regarding interviews for freshers and experienced. In this blog you find out the basic Java programs generally asked in interviews. Core Java , Basic and advanced including JSP and Android based interview questions and answers.. Here we also include some Java solutions for programmers.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-8104643488725012272</id><published>2012-12-16T04:09:00.002-08:00</published><updated>2012-12-16T04:09:55.523-08:00</updated><title type='text'>STAR PATTERN PROGRAM FOR DIAMOND SHAPE IN JAVA</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Star pattern in&amp;nbsp;Java in diamond shape&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import java.util.Scanner;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;* @author pankaj&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public class StarPattern&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void main(String[] args)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;Enter no of row u want in star pattern : &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Scanner in = new Scanner(System.in);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int num=in.nextInt();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int i=1;i&amp;lt;=num;i++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int j=num;j&amp;gt;=i;j--)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot; &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int m=1;m&amp;lt;=i;m++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot; *&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot;\n&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int i=1;i&amp;lt;=num;i++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int j=1;j&amp;lt;=i;j++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot; &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int m=num;m&amp;gt;=i;m--)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot; *&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot;\n&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;OUTPUT:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Enter no of row u want in star pattern : 5&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;* * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; * * * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;* * * * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;* * * * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; * * * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;* * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; * *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;*&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/8104643488725012272/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/star-pattern-program-for-diamond-shape.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8104643488725012272'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8104643488725012272'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/star-pattern-program-for-diamond-shape.html' title='STAR PATTERN PROGRAM FOR DIAMOND SHAPE IN JAVA'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-4487369544442056844</id><published>2012-12-16T03:55:00.002-08:00</published><updated>2012-12-16T03:55:32.380-08:00</updated><title type='text'>Star pattern in java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Program to print star pattern in&amp;nbsp;Java.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import java.util.Scanner;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;* @author pankaj&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public class StarPattern&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void main(String[] args)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;Enter no of row u want in star pattern : &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Scanner in = new Scanner(System.in);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int num=in.nextInt();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int i=1;i&amp;lt;=num;i++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int j=num;j&amp;gt;=i;j--)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot; &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(int m=1;m&amp;lt;=i*2-1;m++)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot;*&quot;);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot;\n&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;OUTPUT:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Enter no of row u want in star pattern : 5&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; *&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;***&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; *****&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp;*******&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;*********&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/4487369544442056844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/star-pattern-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/4487369544442056844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/4487369544442056844'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/star-pattern-in-java.html' title='Star pattern in java'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-1306172343559356717</id><published>2012-12-15T07:19:00.000-08:00</published><updated>2012-12-15T07:19:02.330-08:00</updated><title type='text'>String Reverse Program in Java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import java.io.BufferedReader;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import java.io.InputStreamReader;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;/**&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;* @author pankaj&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public class stringpalindrome&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void main(String[] args)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;enter a string : &quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BufferedReader in = new BufferedReader(new InputStreamReader(System.in));&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String str=in.readLine();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int i=str.length()-1;i&amp;gt;=0;i--)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(str.charAt(i));&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception ex) {&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ex.printStackTrace();&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/1306172343559356717/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/string-reverse-program-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1306172343559356717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1306172343559356717'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/string-reverse-program-in-java.html' title='String Reverse Program in Java'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-821180488425629141</id><published>2012-12-15T07:15:00.000-08:00</published><updated>2012-12-15T07:15:31.933-08:00</updated><title type='text'>STRING PALINDROME PROGRAM IN JAVA</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;import java.io.BufferedReader;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;import java.io.InputStreamReader;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;/**&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;*&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;* @author pankaj&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;*/&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;public class stringpalindrome&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void main(String[] args)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;enter a string : &quot;);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BufferedReader in = new BufferedReader(new InputStreamReader(System.in));&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String str=in.readLine();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String temp=str;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String f=&quot;&quot;;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;char c = 0;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int i=str.length()-1;i&amp;gt;=0;i--)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ c=str.charAt(i);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String s=Character.toString(c);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;f=f.concat(s);&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(temp.equals(f))&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;palindrome&quot;);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;Not a palindrome&quot;);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception ex) {&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ex.printStackTrace();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/821180488425629141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/string-palindrome-program-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/821180488425629141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/821180488425629141'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/string-palindrome-program-in-java.html' title='STRING PALINDROME PROGRAM IN JAVA'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-1521290907528171849</id><published>2012-12-13T03:23:00.000-08:00</published><updated>2012-12-13T03:23:09.538-08:00</updated><title type='text'>Java program to print Fibonacci series</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;import java.util.Scanner;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;/**&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;*&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;* @author pankaj&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;*/&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;public class Fibonicci&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void main(String[] args)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;enter the number till you want fibonicci series : &amp;nbsp;&quot;);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Scanner in=new Scanner(System.in);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int num=in.nextInt();&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int a=0,b=1,i=0,c=0;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(i!=num)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;\n&quot;+c+ &quot; &quot;);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a=b;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b=c;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c=a+b;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;i++; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;}&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/1521290907528171849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/java-program-to-print-fibonacci-series.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1521290907528171849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1521290907528171849'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/java-program-to-print-fibonacci-series.html' title='Java program to print Fibonacci series'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-4878368237489721759</id><published>2012-12-13T00:27:00.000-08:00</published><updated>2012-12-13T00:27:35.959-08:00</updated><title type='text'>Palindrome no program in java</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
eg: 1221 palindrome no, &amp;nbsp;123 not a palindrome &amp;nbsp;..&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import java.io.BufferedReader;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import java.io.InputStreamReader;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;/**&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;* @author pankaj&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;*/&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public class palindrome {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void main(String[] args)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;enter a no to check weather it si a palindrome or not : &quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;BufferedReader br = new BufferedReader(new InputStreamReader(System.in));&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String num=br.readLine();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int no=Integer.parseInt(num);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int temp=no;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int digit=0,ld;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;while(no!=0)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ld=no%10;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;digit=digit*10+ld;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;no=no/10;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(temp==digit)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;Palindrome no&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;Not a palindrome no&quot;);&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} catch (Exception ex) {&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ex.printStackTrace();&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/4878368237489721759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/palindrome-no-program-in-java.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/4878368237489721759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/4878368237489721759'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/palindrome-no-program-in-java.html' title='Palindrome no program in java'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-2602080474828621471</id><published>2012-12-12T23:45:00.003-08:00</published><updated>2012-12-12T23:45:38.089-08:00</updated><title type='text'>Java program to find number is prime or not</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
To Check entered no is prime or not.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;import java.util.Scanner;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;public class Prime {&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void main(String[] args) { &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;enter a no to check :Is it a prime no? &amp;nbsp; &quot;);&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Scanner in=new Scanner(System.in);&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int num=in.nextInt();&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int flag=0;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for(int i=2;i&amp;lt;num;i++)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(num%i==0)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;not a prime no&quot;);&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;flag=1;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(flag==0);&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot; &amp;nbsp;prime no&quot;);&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;}&lt;/b&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/2602080474828621471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/java-program-to-find-number-is-prime-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/2602080474828621471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/2602080474828621471'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/java-program-to-find-number-is-prime-or.html' title='Java program to find number is prime or not'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-3340459166183063011</id><published>2012-12-12T23:36:00.000-08:00</published><updated>2012-12-12T23:36:09.395-08:00</updated><title type='text'>ADVANCED JAVA AND SOME BASIC QUESTIONS WITH ANSWERS FOR INTERVIEW</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;1. What is the
difference between a constructor and a method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A constructor is a member function of a class that is used to
create objects of that class. It has the same name as the class itself, has no
return type, and is invoked using the new operator.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A method is an ordinary member function of a class. It has its
own name, a return type (which may be void), and is invoked using the dot
operator.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;2. What is the purpose
of garbage collection in Java, and when is it used?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The purpose of garbage collection is to identify and discard
objects that are no longer needed by a program so that their resources can be
reclaimed and reused.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A Java object is subject to garbage collection when it becomes
unreachable to the program in which it is used.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;3. Describe synchronization
in respect to multithreading.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;With respect to multithreading, synchronization is the
capability to control the access of multiple threads to shared resources.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Without synchonization, it is possible for one thread to modify
a shared variable while another thread is in the process of using or updating
same shared variable. This usually leads to significant errors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;4. What is an abstract
class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Abstract class must be extended/subclassed (to be useful). It
serves as a template. A class that is abstract may not be instantiated (ie. you
may not call its constructor), abstract class may contain static data.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Any class with an abstract method is automatically abstract
itself, and must be declared as such. A class may be declared abstract even if
it has no abstract methods. This prevents it from being instantiated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;5. What is the
difference between an Interface and an Abstract class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;An abstract class can have instance methods that implement a
default behavior. An Interface can only declare constants and instance methods,
but cannot implement default behavior and all methods are implicitly abstract.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;An interface has all public members and no implementation. An
abstract class is a class which may have the usual flavors of class members (&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;private,
protected&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;, etc.), but has some abstract methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;6. Explain different
way of using thread?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The thread could be implemented by using runnable interface or
by inheriting from the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Thread&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;class. The former is more advantageous,
&#39;cause when you are going for multiple inheritance, the only interface can
help.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;7. What
is an Iterator?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Some of the collection classes provide traversal of their
contents via a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;java.util.Iterator&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;interface. This interface allows you to
walk through a collection of objects, operating on each object in turn.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Remember when using Iterators that they contain a snapshot of
the collection at the time the Iterator was obtained; generally it is not
advisable to modify the collection itself while traversing an Iterator.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;8. State the
significance of public, private, protected, default modifiers both singly and
in combination and state the effect of package relationships on declared items
qualified by these modifiers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Public
class is visible in other packages, field is visible everywhere (class must be
public too)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;private :&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Private
variables or methods may be used only by an instance of the same class that
declares the variable or method, A private feature may only be accessed by the
class that owns the feature.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;protected :&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Is
available to all classes in the same package and also available to all
subclasses of the class that owns the protected feature. This access is
provided even to subclasses that reside in a different package from the class
that owns the protected feature.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;What you get by default ie, without any access modifier (ie,
public private or protected). It means that it is visible to all within a
particular package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;9. What is static in
java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Static means one per class, not one for each object no matter
how many instance of a class might exist. This means that you can use them
without creating an instance of a class.Static methods are implicitly final,
because overriding is done based on the type of the object, and static methods
are attached to a class, not an object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A static method in a superclass can be shadowed by another
static method in a subclass, as long as the original method was not declared
final. However, you can&#39;t override a static method with a nonstatic method. In
other words, you can&#39;t change a static method into an instance method in a
subclass.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;10. What is final
class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;class can&#39;t be extended ie., final class
may not be subclassed. A final method can&#39;t be overridden when its class is
inherited. You can&#39;t change value of a final variable (is a constant).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;11. What if the main()
method is declared as private?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The program compiles properly but at runtime it will give &quot;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method not public.&quot; message.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;12. What if the static
modifier is removed from the signature of the main() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Program compiles. But at runtime throws an error
&quot;NoSuchMethodError&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;13. What
if I write static public void instead of public static void?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Program compiles and runs properly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;14. What if I do not
provide the String array as the argument to the method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Program compiles but throws a runtime error
&quot;NoSuchMethodError&quot;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;15. What is the first
argument of the String array in main() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The String array is empty. It does not have any element. This is
unlike C/C++ where the first element by default is the program name.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;16. If I do not provide
any arguments on the command line, then the String array of main() method will
be empty or null?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;It is empty. But not null.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;17. How can one prove
that the array is not null but empty using one line of code?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Print&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;args.length&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;. It
will print 0. That means it is empty. But if it would have been null then it
would have thrown a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;NullPointerException&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;on attempting to print&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;args.length&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;18. What environment
variables do I need to set on my machine in order to be able to run Java
programs?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;CLASSPATH&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;PATH&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;are the two variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;19. Can
an application have multiple classes having main() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Yes it is possible. While starting the application we mention
the class name to be run. The JVM will look for the Main method only in the
class whose name you have mentioned.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Hence there is not conflict amongst the multiple classes having&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;20. Can I have multiple
main() methods in the same class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No the program fails to compile. The compiler says that the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method is already defined in the class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;21. Do I need to import
java.lang package any time? Why ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No. It is by default loaded internally by the JVM.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;22. Can I import same
package/class twice? Will the JVM load the package twice at runtime?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;One can import the same package or same class multiple times.
Neither compiler nor JVM complains about it. And the JVM will internally load
the class only once no matter how many times you import the same class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;23. What are Checked
and UnChecked Exception?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A checked exception is some subclass of Exception (or Exception
itself), excluding class RuntimeException and its subclasses. Making an
exception checked forces client programmers to deal with the possibility that
the exception will be thrown.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Example:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;IOException&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;thrown by&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;java.io.FileInputStream&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&#39;s&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;read()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method·&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Unchecked exceptions are RuntimeException and any of its
subclasses. Class Error and its subclasses also are unchecked. With an
unchecked exception, however, the compiler doesn&#39;t force client programmers
either to catch the exception or declare it in a throws clause. In fact, client
programmers may not even know that the exception could be thrown.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Example:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;StringIndexOutOfBoundsException&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;thrown by String&#39;s&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;charAt()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method· Checked exceptions must be caught
at compile time. Runtime exceptions do not need to be. Errors often cannot be.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;24. What is Overriding?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;When a class defines a method using the same name, return type,
and arguments as a method in its superclass, the method in the class overrides
the method in the superclass.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;When the method is invoked for an object of the class, it is the
new definition of the method that is called, and not the method definition from
superclass. Methods may be overridden to be more public, not more private.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;25. Are
the imports checked for validity at compile time? Example: will the code
containing an import such as java.lang.ABCD compile?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Yes the imports are checked for the semantic validity at compile
time. The code containing above line of import will not compile. It will throw
an error saying, can not resolve symbol&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;symbol :&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;class ABCD&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;location:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;package io&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;import java.io.ABCD;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;26. Does importing a
package imports the subpackages as well? Example: Does importing com.MyTest.*
also import com.MyTest.UnitTests.*?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No you will have to import the subpackages explicitly. Importing&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;com.MyTest.*&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;will import classes in the package&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;MyTest&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;only. It will not import any class in any
of it&#39;s subpackage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;27. What is the
difference between declaring a variable and defining a variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;In declaration we just mention the type of the variable and it&#39;s
name. We do not initialize it. But defining means declaration + initialization.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Example:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;String s;&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;is just a declaration while&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;String s = new String
(&quot;abcd&quot;);&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Or&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;String s = &quot;abcd&quot;;&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;are both definitions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;28. What is the default
value of an object reference declared as an instance variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The default value will be&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;unless we define it explicitly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;29. Can a top level
class be private or protected?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No. A top level class cannot be private or protected. It can
have either &quot;public&quot; or no modifier. If it does not have a modifier
it is supposed to have a default access.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;If a top level class is declared as private the compiler will
complain that the &quot;modifier private is not allowed here&quot;. This means
that a top level class can not be private. Same is the case with protected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;30. What type of
parameter passing does Java support?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;In Java the arguments are always passed by value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;31.
Primitive data types are passed by reference or pass by value?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Primitive data types are passed by value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;32. Objects are passed
by value or by reference?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Java only supports pass by value. With objects, the object
reference itself is passed by value and so both the original reference and
parameter copy both refer to the same object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;33. What is
serialization?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Serialization is a mechanism by which you can save the state of
an object by converting it to a byte stream.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;34. How do I serialize
an object to a file?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The class whose instances are to be serialized should implement
an interface Serializable. Then you pass the instance to the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;ObjectOutputStream&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;which is connected to a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;fileoutputstream&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;. This
will save the object to a file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;35. Which methods of
Serializable interface should I implement?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The serializable interface is an empty interface, it does not
contain any methods. So we do not implement any methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;36. How can I customize
the seralization process? i.e. how can one have a control over the
serialization process?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Yes it is possible to have control over serialization process.
The class should implement Externalizable interface. This interface contains
two methods namely&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;readExternal&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;writeExternal&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;You should implement these methods and write the logic for
customizing the serialization process.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;37. What
is the common usage of serialization?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Whenever an object is to be sent over the network, objects need
to be serialized. Moreover if the state of an object is to be saved, objects
need to be serilazed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;38. What is
Externalizable interface?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Externalizable is an interface which contains two methods&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;readExternal&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;writeExternal&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.
These methods give you a control over the serialization mechanism.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Thus if your class implements this interface, you can customize
the serialization process by implementing these methods.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;39. When you serialize
an object, what happens to the object references included in the object?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The serialization mechanism generates an object graph for
serialization. Thus it determines whether the included object references are
serializable or not. This is a recursive process.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Thus when an object is serialized, all the included objects are
also serialized alongwith the original obect.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;40. What one should
take care of while serializing the object?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;One should make sure that all the included objects are also
serializable. If any of the objects is not serializable then it throws a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;NotSerializableException&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;41. What happens to the
static fields of a class during serialization?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;There are three exceptions in which serialization doesnot
necessarily read and write to the stream. These are&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;1. Serialization ignores static fields, because they are not
part of ay particular state state.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;2. Base class fields are only hendled if the base class itself
is serializable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;3. Transient fields.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;42. Does Java provide
any construct to find out the size of an object?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No, there is not sizeof operator in Java. So there is not direct
way to determine the size of an object directly in Java.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;43. What
are wrapper classes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Java provides specialized classes corresponding to each of the
primitive data types. These are called wrapper classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;They are example: Integer, Character, Double etc.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;44. Why do we need
wrapper classes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;It is sometimes easier to deal with primitives as objects.
Moreover most of the collection classes store objects and not primitive data
types. And also the wrapper classes provide many utility methods also.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Because of these resons we need wrapper classes. And since we
create instances of these classes we can store them in any of the collection
classes and pass them around as a collection. Also we can pass them around as
method parameters where a method expects an object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;45. What are checked
exceptions?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Checked exception are those which the Java compiler forces you
to catch.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Example:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;IOException&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;are checked exceptions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;46. What are runtime
exceptions?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Runtime exceptions are those exceptions that are thrown at
runtime because of either wrong input data or because of wrong business logic
etc. These are not checked by the compiler at compile time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;47. What is the
difference between error and an exception?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;An error is an irrecoverable condition occurring at runtime.
Such as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;OutOfMemory&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;error.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;These JVM errors and you can not repair them at runtime. While
exceptions are conditions that occur because of bad input etc. Example:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;FileNotFoundException&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;will be thrown if the specified file does
not exist. Or a&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;NullPointerException&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;will
take place if you try using a null reference.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;In most of the cases it is possible to recover from an exception
(probably by giving user a feedback for entering proper values etc.).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;48. How to create
custom exceptions?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Your class should extend&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;class
Exception&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;, or some more specific type thereof.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;49. If I
want an object of my class to be thrown as an exception object, what should I
do?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The class should extend from Exception class. Or you can extend
your class from some more precise exception type also.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;50. If my class already
extends from some other class what should I do if I want an instance of my
class to be thrown as an exception object?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;One can not do anytihng in this scenarion. Because Java does not
allow multiple inheritance and does not provide any exception interface as
well.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;51. How does an
exception permeate through the code?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;An unhandled exception moves up the method stack in search of a
matching When an exception is thrown from a code which is wrapped in a try
block followed by one or more catch blocks, a search is made for matching catch
block. If a matching type is found then that block will be invoked. If a
matching type is not found then the exception moves up the method stack and
reaches the caller method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Same procedure is repeated if the caller method is included in a
try catch block. This process continues until a catch block handling the
appropriate type of exception is found. If it does not find such a block then
finally the program terminates.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;52. What are the
different ways to handle exceptions?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;There are two ways to handle exceptions,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;1. By wrapping the desired code in a try block followed by a
catch block to catch the exceptions. and&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;2. List the desired exceptions in the throws clause of the
method and let the caller of the method hadle those exceptions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;53. Is it necessary
that each try block must be followed by a catch block?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;It is not necessary that each&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;block must be followed by a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;block. It should be followed by either a
catch block or a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;finally&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;block. And whatever exceptions are likely
to be thrown should be declared in the throws clause of the method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;54. If I write return
at the end of the try block, will the finally block still execute?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Yes even if you write return as the last statement in the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;block and no exception occurs, the
finally block will execute. The finally block will execute and then the control
return.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;55. If I
write System.exit(0); at the end of the try block, will the finally block still
execute?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No. In this case the finally block will not execute because when
you say&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;System.exit(0);&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;the control immediately goes out of the
program, and thus finally never executes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;56. How are Observer
and Observable used?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Objects that subclass the Observable class maintain a list of
observers. When an Observable object is updated it invokes the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;update()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method of each of its observers to notify
the observers that it has changed state. The Observer interface is implemented
by objects that observe Observable objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;57. What is
synchronization and why is it important?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;With respect to multithreading, synchronization is the
capability to control the access of multiple threads to shared resources.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Without synchronization, it is possible for one thread to modify
a shared object while another thread is in the process of using or updating
that object&#39;s value. This often leads to significant errors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;58. How does Java
handle integer overflows and underflows?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;It uses those low order bytes of the result that can fit into
the size of the type allowed by the operation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;59. Does garbage
collection guarantee that a program will not run out of memory?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Garbage collection does not guarantee that a program will not
run out of memory. It is possible for programs to use up memory resources
faster than they are garbage collected. It is also possible for programs to
create objects that are not subject to garbage collection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;60. What is the
difference between preemptive scheduling and time slicing?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Under preemptive scheduling, the highest priority task executes
until it enters the waiting or dead states or a higher priority task comes into
existence.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Under time slicing, a task executes for a predefined slice of
time and then reenters the pool of ready tasks. The scheduler then determines
which task should execute next, based on priority and other factors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;61. When
a thread is created and started, what is its initial state?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A thread is in the ready state after it has been created and
started.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;62. What is the purpose
of finalization?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The purpose of finalization is to give an unreachable object the
opportunity to perform any cleanup processing before the object is garbage
collected.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;63. What is the Locale
class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The Locale class is used to tailor program output to the
conventions of a particular geographic, political, or cultural region.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;64. What is the difference
between a while statement and a do statement?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;statement checks at the beginning of a
loop to see whether the next loop iteration should occur.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;do&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;statement checks at the end of a loop to
see whether the next iteration of a loop should occur. The do statement will
always execute the body of a loop at least once.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;65. What is the
difference between static and non-static variables?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;A static variable is associated with the class as a whole rather
than with specific instances of a class. Non-static variables take on unique
values with each object instance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;66. How are this() and
super() used with constructors?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;this()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;is
used to invoke a constructor of the same class.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;super()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;is used to invoke a superclass
constructor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;67. What
is daemon thread and which method is used to create the daemon thread?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Daemon thread is a low priority thread which runs intermittently
in the back ground doing the garbage collection operation for the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;java runtime system.setDaemon&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method is used to create a daemon thread.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;68. Can applets
communicate with each other?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;At this point in time applets may communicate with other applets
running in the same virtual machine. If the applets are of the same class, they
can communicate via shared static variables. If the applets are of different
classes, then each will need a reference to the same class with static
variables. In any case the basic idea is to pass the information back and forth
through a static variable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;An applet can also get references to all other applets on the
same page using the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;getApplets()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method of&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;java.applet.AppletContext&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;. Once
you get the reference to an applet, you can communicate with it by using its
public members.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;It is conceivable to have applets in different virtual machines
that talk to a server somewhere on the Internet and store any data that needs
to be serialized there. Then, when another applet needs this data, it could
connect to this same server. Implementing this is non-trivial.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;69. What are the steps
in the JDBC connection?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;While making a JDBC connection we go through the following steps
:&lt;br /&gt;
&lt;br /&gt;
Step 1 : Register the database driver by using :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Class.forName(\&quot; driver classs for that specific
database\&quot; );&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Step 2 : Now create a database connection using :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Connection con =
DriverManager.getConnection(url,username,password);&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Step 3: Now Create a query using :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;Statement stmt = Connection.Statement(\&quot;select * from TABLE
NAME\&quot;);&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Step 4 : Exceute the query :&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;stmt.exceuteUpdate();&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;70. How does a try
statement determine which catch clause should be used to handle an exception?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;When an exception is thrown within the body of a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;statement, the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;catch&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;clauses of the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;statement are examined in the order in
which they appear. The first catch clause that is capable of handling the
exceptionis executed. The remaining catch clauses are ignored.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;71. Can an unreachable object
become reachable again?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;An unreachable object may become reachable again. This can
happen when the object&#39;s&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;finalize()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method is invoked and the object performs
an operation which causes it to become accessible to reachable objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;72. What method must be
implemented by all threads?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;All tasks must implement the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;run()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method, whether they are a subclass of
Thread or implement the Runnable interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;73. What
are synchronized methods and synchronized statements?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Synchronized methods are methods that are used to control access
to an object. A thread only executes a synchronized method after it has
acquired the lock for the method&#39;s object or class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Synchronized statements are similar to synchronized methods. A
synchronized statement can only be executed after a thread has acquired the
lock for the object or class referenced in the synchronized statement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;74. What is
Externalizable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Externalizable is an Interface that extends Serializable
Interface. And sends data into Streams in Compressed Format. It has two
methods,&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;writeExternal(ObjectOuput
out)&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;readExternal(ObjectInput in)&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;75. What modifiers are
allowed for methods in an Interface?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Only&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;abstract&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;modifiers are allowed for methods in
interfaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;76. What are some
alternatives to inheritance?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Delegation is an alternative to inheritance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Delegation means that you include an instance of another class
as an instance variable, and forward messages to the instance. It is often
safer than inheritance because it forces you to think about each message you
forward, because the instance is of a known class, rather than a new class, and
because it doesn&#39;t force you to accept all the methods of the super class: you
can provide only the methods that really make sense. On the other hand, it
makes you write more code, and it is harder to re-use (because it is not a
subclass).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;77. What does it mean
that a method or field is &quot;static&quot;?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Static variables and methods are instantiated only once per
class. In other words they are class variables, not instance variables. If you
change the value of a static variable in a particular object, the value of that
variable changes for all instances of that class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Static methods can be referenced with the name of the class
rather than the name of a particular object of the class (though that works
too). That&#39;s how library methods like&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;System.out.println()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;work out is a static field in the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;java.lang.System&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;78. What is the
difference between preemptive scheduling and time slicing?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Under preemptive scheduling, the highest priority task executes
until it enters the waiting or dead states or a higher priority task comes into
existence. Under time slicing, a task executes for a predefined slice of time
and then reenters the pool of ready tasks.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The scheduler then determines which task should execute next,
based on priority and other factors.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;79. What
is the catch or declare rule for method declarations?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;If a checked exception may be thrown within the body of a
method, the method must either catch the exception or declare it in its throws
clause.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;80. Is Empty .java file
a valid source file?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Yes. An empty&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.java&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;file is a perfectly valid source file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;81. Can a .java file
contain more than one java classes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Yes. A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.java&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;file contain more than one java classes,
provided at the most one of them is a public class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;82. Is String a
primitive data type in Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No. String is not a primitive data type in Java, even though it
is one of the most extensively used object. Strings in Java are instances of
String class defined in&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;java.lang
package&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;83. Is main a keyword
in Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;main&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;is not a keyword in Java.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;84. Is next a keyword
in Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;next&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;is not a keyword.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;85. Is
delete a keyword in Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;delete&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;is not a keyword in Java. Java does not
make use of explicit destructors the way C++ does.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;86. Is exit a keyword
in Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No. To exit a program explicitly you use&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;exit&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method in System object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;87. What happens if you
dont initialize an instance variable of any of the primitive types in Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Java by default initializes it to the default value for that
primitive type. Thus an int will be initialized to&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;(zero), a boolean will be
initialized to&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;88. What will be the
initial value of an object reference which is defined as an instance variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The object references are all initialized to null in Java.
However in order to do anything useful with these references, you must set them
to a valid object, else you will get&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;NullPointerExceptions&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;everywhere you try to use such default
initialized references.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;89. What are the
different scopes for Java variables?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The scope of a Java variable is determined by the context in
which the variable is declared. Thus a java variable can have one of the three
scopes at any given point in time.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;1. Instance : - These are typical object level variables, they
are initialized to default values at the time of creation of object, and remain
accessible as long as the object accessible.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;2. Local : - These are the variables that are defined within a
method. They remain accessbile only during the course of method excecution.
When the method finishes execution, these variables fall out of scope.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;3. Static: - These are the class level variables. They are
initialized when the class is loaded in JVM for the first time and remain there
as long as the class remains loaded. They are not tied to any particular object
instance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;90. What is the default
value of the local variables?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The local variables are not initialized to any default value,
neither primitives nor object references. If you try to use these variables
without initializing them explicitly, the java compiler will not compile the
code. It will complain abt the local varaible not being initilized.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;91. How
many objects are created in the following piece of code?&lt;br /&gt;
MyClass c1, c2, c3;&lt;br /&gt;
c1 = new MyClass ();&lt;br /&gt;
c3 = new MyClass ();&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Only 2 objects are created,&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;c1&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;c3&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;. The
reference&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;c2&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;is only declared and not initialized.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;92. Can a public class
MyClass be defined in a source file named YourClass.java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;No. The source file name, if it contains a public class, must be
the same as the public class name itself with a&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;.java&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;extension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;93. Can main() method
be declared final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Yes, the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;method can be declared&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;, in addition to being&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;public static&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;94. What is HashMap and
Map?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Map is an Interface and Hashmap is the class that implements
Map.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;95. Difference between
HashMap and HashTable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;The HashMap class is roughly equivalent to Hashtable, except
that it is unsynchronized and permits nulls. (HashMap allows null values as key
and value whereas Hashtable doesnt allow).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;HashMap does not guarantee that the order of the map will remain
constant over time. HashMap is unsynchronized and Hashtable is synchronized.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;96. Difference between
Vector and ArrayList?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Vector is synchronized whereas arraylist is not.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;/span&gt;97.
Difference between Swing and Awt?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;AWT are heavy-weight componenets. Swings are light-weight
components. Hence swing works faster than AWT.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;98. What will be the
default values of all the elements of an array defined as an instance variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;If the array is an array of primitive types, then all the
elements of the array will be initialized to the default value corresponding to
that primitive type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;Example: All the elements of an array of int will be initialized
to&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;(zero), while that of
boolean type will be initialized to&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.
Whereas if the array is an array of references (of any type), all the elements
will be initialized to&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;; font-size: 10pt;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/3340459166183063011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/advanced-java-and-some-basic-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/3340459166183063011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/3340459166183063011'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/advanced-java-and-some-basic-questions.html' title='ADVANCED JAVA AND SOME BASIC QUESTIONS WITH ANSWERS FOR INTERVIEW'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-4245002278740256290</id><published>2012-12-12T21:51:00.000-08:00</published><updated>2012-12-18T10:47:48.751-08:00</updated><title type='text'>Core java interview questions and answers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;1. What is the most important feature of Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Java is a platform independent language.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;2. What do you mean by platform independence?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Platform independence means that we can write and compile the java code in one platform (eg Windows) and can execute the class in any other supported platform eg (Linux,Solaris,etc).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;3. What is a JVM?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;JVM is Java Virtual Machine which is a run time environment for the compiled java class files.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;4. Are JVM&#39;s platform independent?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;JVM&#39;s are not platform independent. JVM&#39;s are platform specific run time implementation provided by the vendor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;5. What is the difference between a JDK and a JVM?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;JDK is Java Development Kit which is for development purpose and it includes execution environment also. But JVM is purely a run time environment and hence you will not be able to compile your source files using a JVM.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;6. What is a pointer and does Java support pointers?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Pointer is a reference handle to a memory location. Improper handling of pointers leads to memory leaks and reliability issues hence Java doesn&#39;t support the usage of pointers.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;7. What is the base class of all classes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;java.lang.Object&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;8. Does Java support multiple inheritance?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Java doesn&#39;t support multiple inheritance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;9. Is Java a pure object oriented language?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Java uses primitive data types and hence is not a pure object oriented language.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;10. Are arrays primitive data types?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;In Java, Arrays are objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;11. What is difference between Path and Classpath?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Path and Classpath are operating system level environment variales. Path is used define where the system can find the executables(.exe) files and classpath is used to specify the location .class files.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;12. What are local variables?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Local varaiables are those which are declared within a block of code like methods. Local variables should be initialised before accessing them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;13. What are instance variables?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Instance variables are those which are defined at the class level. Instance variables need not be initialized before using them as they are automatically initialized to their default values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;14. How to define a constant variable in Java?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The variable should be declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;static&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;. So only one copy of the variable exists for all instances of the class and the value can&#39;t be changed also.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;static final int PI = 2.14;&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;is an example for constant.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;15. Should a main() method be compulsorily declared in all java classes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;No not required.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method should be defined only if the source class is a java application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;16. What is the return type of the main() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method doesn&#39;t return anything hence declared&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;17. Why is the main() method declared static?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method is called by the JVM even before the instantiation of the class hence it is declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;18. What is the arguement of main() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method accepts an array of String object as arguement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;19. Can a main() method be overloaded?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes. You can have any number of&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;methods with different method signature and implementation in the class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;20. Can a main() method be declared final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes. Any inheriting class will not be able to have it&#39;s own default&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;21. Does the order of public and static declaration matter in main() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;No. It doesn&#39;t matter but&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;void&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;should always come before&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;main()&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;22. Can a source file contain more than one class declaration?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes a single source file can contain any number of Class declarations but only one of the class can be declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;23. What is a package?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Package is a collection of related classes and interfaces. package declaration should be first statement in a java class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;24. Which package is imported by default?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;java.lang package&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;is imported by default even without a package declaration.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;25. Can a class declared as private be accessed outside it&#39;s package?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Not possible.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;26. Can a class be declared as protected?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A class can&#39;t be declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;. only methods can be declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;protected&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;27. What is the access scope of a protected method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;protected&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method can be accessed by the classes within the same package or by the subclasses of the class in any package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;28. What is the purpose of declaring a variable as final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;variable&#39;s value can&#39;t be changed.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;variables should be initialized before using them.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;29. What is the impact of declaring a method as final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A method declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;can&#39;t be overridden. A sub-class can&#39;t have the same method signature with a different implementation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;30. I don&#39;t want my class to be inherited by any other class. What should i do?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;You should declared your class as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;. But you can&#39;t define your class as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;, if it is an&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;abstract&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;class. A class declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;can&#39;t be extended by any other class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;/span&gt;31. Can you give few examples of final classes defined in Java API?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;java.lang.String, java.lang.Math&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;are&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;32. How is final different from finally and finalize()?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;is a modifier which can be applied to a class or a method or a variable.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;class can&#39;t be inherited,&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;method can&#39;t be overridden and&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;variable can&#39;t be changed.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;br /&gt;finally is an exception handling code section which gets executed whether an exception is raised or not by the try block code segment.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;finalize()&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;is a method of Object class which will be executed by the JVM just before garbage collecting object to give a final chance for resource releasing activity.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;33. Can a class be declared as static?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;We can not declare top level class as static, but only inner class can be declared static.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background: #f8f8f8; border-bottom: #93b7d5 1pt dashed; border-left: #93b7d5 1pt dashed; border-right: #93b7d5 1pt dashed; border-top: #93b7d5 1pt dashed; mso-border-alt: dashed #93B7D5 .75pt; mso-element: para-border-div; padding-bottom: 8pt; padding-left: 8pt; padding-right: 8pt; padding-top: 8pt;&quot;&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;class Test&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;class InnerClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; InnerMethod()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{ System.out.println(&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&quot;Static Inner Class!&quot;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;); }&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;} &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;public&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;void&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt; main(String args[])&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Test.InnerClass.InnerMethod();&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;background: #f8f8f8; border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none; line-height: 12.75pt; margin-bottom: 0in; mso-border-alt: dashed #93B7D5 .75pt; mso-padding-alt: 8.0pt 8.0pt 8.0pt 8.0pt; padding-bottom: 0in; padding-left: 0in; padding-right: 0in; padding-top: 0in; tab-stops: 45.8pt 91.6pt 137.4pt 183.2pt 229.0pt 274.8pt 320.6pt 366.4pt 412.2pt 458.0pt 503.8pt 549.6pt 595.4pt 641.2pt 687.0pt 732.8pt;&quot;&gt;
&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;//output: Static Inner Class!&lt;/span&gt;&lt;span style=&quot;font-family: Courier; font-size: 10pt; mso-bidi-font-family: &#39;Courier New&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;34. When will you define a method as static?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;When a method needs to be accessed even before the creation of the object of the class then we should declare the method as&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;static&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;35. What are the restriction imposed on a static method or a static block of code?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;A static method should not refer to instance variables without creating an instance and cannot use &quot;this&quot; operator to refer the instance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;36. I want to print &quot;Hello&quot; even before main() is executed. How will you acheive that?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;Print the statement inside a static block of code. Static blocks get executed when the class gets loaded into the memory and even before the creation of an object. Hence it will be executed before the&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;main()&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;method. And it will be executed only once.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 12.75pt; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt; mso-bidi-font-family: &#39;Times New Roman&#39;; mso-fareast-font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;37. What is the importance of static variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;static variables are class level variables where all objects of the class refer to the same variable. If one object changes the value then the change gets reflected in all the objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;38. Can we declare a static variable inside a method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Static varaibles are class level variables and they can&#39;t be declared inside a method. If declared, the class will not compile.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;39. What is an Abstract Class and what is it&#39;s purpose?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A Class which doesn&#39;t provide complete implementation is defined as an abstract class. Abstract classes enforce abstraction.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;40. Can a abstract class be declared final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Not possible. An abstract class without being inherited is of no use and hence will result in compile time error.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;41. What is use of a abstract variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Variables can&#39;t be declared as abstract. only classes and methods can be declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;abstract&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;42. Can you create an object of an abstract class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Not possible. Abstract classes can&#39;t be instantiated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;43. Can a abstract class be defined without any abstract methods?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes it&#39;s possible. This is basically to avoid instance creation of the class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;44. Class C implements Interface I containing method m1 and m2 declarations. Class C has provided implementation for method m2. Can i create an object of Class C?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;No not possible.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Class C&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;should provide implementation for all the methods in the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Interface I&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;. Since&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Class C&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;didn&#39;t provide implementation for&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;m1&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method, it has to be declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;abstract&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;. Abstract classes can&#39;t be instantiated.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;45. Can a method inside a Interface be declared as final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;No not possible. Doing so will result in compilation error.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;abstract&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;are the only applicable modifiers for method declaration in an&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;interface&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;46. Can an Interface implement another Interface?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Intefaces doesn&#39;t provide implementation hence a interface cannot implement another interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;47. Can an Interface extend another Interface?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes an Interface can inherit another Interface, for that matter an Interface can extend more than one Interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;48. Can a Class extend more than one Class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Not possible. A Class can extend only one class but can implement any number of Interfaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;49. Why is an Interface be able to extend more than one Interface but a Class can&#39;t extend more than one Class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Basically Java doesn&#39;t allow multiple inheritance, so a Class is restricted to extend only one Class. But an Interface is a pure abstraction model and doesn&#39;t have inheritance hierarchy like classes(do remember that the base class of all classes is Object). So an Interface is allowed to extend more than one Interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;50. Can an Interface be final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Not possible. Doing so so will result in compilation error.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;51. Can a class be defined inside an Interface?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes it&#39;s possible.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;52. Can an Interface be defined inside a class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes it&#39;s possible.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;53. What is a Marker Interface?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;An Interface which doesn&#39;t have any declaration inside but still enforces a mechanism.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;54. Which object oriented Concept is achieved by using overloading and overriding?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Polymorphism.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;55. Why does Java not support operator overloading?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Operator overloading makes the code very difficult to read and maintain. To maintain code simplicity, Java doesn&#39;t support operator overloading.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;56. Can we define private and protected modifiers for variables in interfaces?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;No.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;57. What is Externalizable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Externalizable is an Interface that extends Serializable Interface. And sends data into Streams in Compressed Format. It has two methods,&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;writeExternal(ObjectOuput out)&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;readExternal(ObjectInput in)&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;58. What modifiers are allowed for methods in an Interface?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Only&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;abstract&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;modifiers are allowed for methods in interfaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;59. What is a local, member and a class variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Variables declared within a method are &quot;local&quot; variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Variables declared within the class i.e not within any methods are &quot;member&quot; variables (global variables).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Variables declared within the class i.e not within any methods and are defined as &quot;static&quot; are class variables.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;60. What is an abstract method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;An abstract method is a method whose implementation is deferred to a subclass.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;61. What value does read() return when it has reached the end of a file?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;read()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;method returns&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;when it has reached the end of a file.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;62. Can a Byte object be cast to a double value?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;No, an object cannot be cast to a primitive value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;63. What is the difference between a static and a non-static inner class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A non-static inner class may have object instances that are associated with instances of the class&#39;s outer class. A static inner class does not have any object instances.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;64. What is an object&#39;s lock and which object&#39;s have locks?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;An object&#39;s lock is a mechanism that is used by multiple threads to obtain synchronized access to the object. A thread may execute a synchronized method of an object only after it has acquired the object&#39;s lock. All objects and classes have locks. A class&#39;s lock is acquired on the class&#39;s Class object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;65. What is the % operator?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;It is referred to as the modulo or remainder operator. It returns the remainder of dividing the first operand by the second operand.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;66. When can an object reference be cast to an interface reference?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;An object reference be cast to an interface reference when the object implements the referenced interface.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;67. Which class is extended by all other classes?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The Object class is extended by all other classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;68. Which non-Unicode letter characters may be used as the first character of an identifier?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The non-Unicode letter characters&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;may appear as the first character of an identifier&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;69. What restrictions are placed on method overloading?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Two methods may not have the same name and argument list but different return types.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;70. What is casting?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;There are two types of casting, casting between primitive numeric types and casting between object references. Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer to an object by a compatible class, interface, or array type reference.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;71. What is the return type of a program&#39;s main() method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;void.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;72. If a variable is declared as private, where may the variable be accessed?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A private variable may only be accessed within the class in which it is declared.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;73. What do you understand by private, protected and public?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;These are accessibility modifiers.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;Private&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;is the most restrictive, while&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;is the least restrictive. There is no real difference between&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;protected&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and the default type (also known as package protected) within the context of the same package, however the protected keyword allows visibility to a derived class in a different package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;74. What is Downcasting ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Downcasting is the casting from a general to a more specific type, i.e. casting down the hierarchy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;75. What modifiers may be used with an inner class that is a member of an outer class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A (non-local) inner class may be declared as public, protected, private, static, final, or abstract.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;76. How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Unicode requires 16 bits and ASCII require 7 bits Although the ASCII character set uses only 7 bits, it is usually represented as 8 bits.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;UTF-8 represents characters using 8, 16, and 18 bit patterns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;UTF-16 uses 16-bit and larger bit patterns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;77. What restrictions are placed on the location of a package statement within a source code file?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A package statement must appear as the first line in a source code file (excluding blank lines and comments).&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;78. What is a native method?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A native method is a method that is implemented in a language other than Java.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;79. What are order of precedence and associativity, and how are they used?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Order of precedence determines the order in which operators are evaluated in expressions. Associatity determines whether an expression is evaluated left-to-right or right-to-left.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;80. Can an anonymous class be declared as implementing an interface and extending a class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;An anonymous class may implement an interface or extend a superclass, but may not be declared to do both.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;81. What is the range of the char type?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The range of the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;char&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;type is 0 to 2&lt;sup&gt;16&lt;/sup&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;- 1 (i.e. 0 to 65535.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;82. What is the range of the short type?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The range of the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;short&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;type is -(2&lt;sup&gt;15&lt;/sup&gt;) to 2&lt;sup&gt;15&lt;/sup&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;- 1. (i.e. -32,768 to 32,767)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;83. Why isn&#39;t there operator overloading?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Because C++ has proven by example that operator overloading makes code almost impossible to maintain.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;84. What does it mean that a method or field is &quot;static&quot;?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Static variables and methods are instantiated only once per class. In other words they are class variables, not instance variables. If you change the value of a static variable in a particular object, the value of that variable changes for all instances of that class. Static methods can be referenced with the name of the class rather than the name of a particular object of the class (though that works too). That&#39;s how library methods like&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;System.out.println()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;work. out is a static field in the&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;java.lang.System class&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;85. Is null a keyword?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The null value is not a keyword.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;86. Which characters may be used as the second character of an identifier, but not as the first character of an identifier?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;87. Is the ternary operator written x : y ? z or x ? y : z ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;It is written&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;x ? y : z&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;88. How is rounding performed under integer division?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The fractional part of the result is truncated. This is known as rounding toward zero.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;89. If a class is declared without any access modifiers, where may the class be accessed?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A class that is declared without any access modifiers is said to have package access. This means that the class can only be accessed by other classes and interfaces that are defined within the same package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;90. Does a class inherit the constructors of its superclass?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A class does not inherit constructors from any of its superclasses.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;91. Name the eight primitive Java types.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The eight primitive types are byte, char, short, int, long, float, double, and boolean.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;92. What restrictions are placed on the values of each case of a switch statement?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;During compilation, the values of each case of a&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;switch&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;statement must evaluate to a value that can be promoted to an&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;93. What is the difference between a while statement and a do while statement?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;while&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;statement checks at the beginning of a loop to see whether the next loop iteration should occur. A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;do while&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;statement checks at the end of a loop to see whether the next iteration of a loop should occur. The&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;do while&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;statement will always execute the body of a loop at least once.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;94. What modifiers can be used with a local inner class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A local inner class may be&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;or&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;abstract&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;95. When does the compiler supply a default constructor for a class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The compiler supplies a default constructor for a class if no other constructors are provided.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;96. If a method is declared as protected, where may the method be accessed?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A protected method may only be accessed by classes or interfaces of the same package or by subclasses of the class in which it is declared.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;97. What are the legal operands of the instanceof operator?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The left operand is an object reference or null value and the right operand is a class, interface, or array type.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;98. Are true and false keywords?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The values true and false are not keywords.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;99. What happens when you add a double value to a String?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The result is a String object.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;100. What is the diffrence between inner class and nested class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;When a class is defined within a scope od another class, then it becomes inner class. If the access modifier of the inner class is static, then it becomes nested class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;101. Can an abstract class be final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;An abstract class may not be declared as&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;final&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;102. What is numeric promotion?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Numeric promotion is the conversion of a smaller numeric type to a larger numeric type, so that integer and floating-point operations may take place. In numerical promotion, byte, char, and short values are converted to int values. The int values are also converted to long values, if necessary. The long and float values are converted to double values, as required.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;103. What is the difference between a public and a non-public class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A public class may be accessed outside of its package. A non-public class may not be accessed outside of its package.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;104. To what value is a variable of the boolean type automatically initialized?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The default value of the boolean type is false.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;105. What is the difference between the prefix and postfix forms of the ++ operator?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The prefix form performs the increment operation and returns the value of the increment operation. The postfix form returns the current value all of the expression and then performs the increment operation on that value.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;106. What restrictions are placed on method overriding?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;107. What is a Java package and how is it used?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A Java package is a naming context for classes and interfaces. A package is used to create a separate name space for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control accessibility to these classes and interfaces.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;108. What modifiers may be used with a top-level class?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A top-level class may be public, abstract, or final.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;109. What is the difference between an if statement and a switch statement?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;statement is used to select among two alternatives. It uses a boolean expression to decide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternative should be executed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;110. What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. import java.net.* versus import java.net.Socket)?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;It makes no difference in the generated class files since only the classes that are actually used are referenced by the generated class file. There is another practical benefit to importing single classes, and this arises when two (or more) packages have classes with the same name. Take&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;java.util.Timer&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and javax.swing.Timer, for example. If I&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;import java.util.*&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;javax.swing.*&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and then try to use &quot;Timer&quot;, I get an error while compiling (the class name is ambiguous between both packages). Let&#39;s say what you really wanted was the&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;javax.swing.Timer&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;class, and the only classes you plan on using in&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;java.util&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;are Collection and HashMap. In this case, some people will prefer to&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;import java.util.Collection&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;and&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;import java.util.HashMap&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;instead of importing&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;java.util.*&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;. This will now allow them to use Timer, Collection, HashMap, and other&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;javax.swing&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;classes without using fully qualified class names in.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;111. Can a method be overloaded based on different return type but same argument type ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;No, because the methods can be called without using their return type in which case there is ambiquity for the compiler.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;112. What happens to a static variable that is defined within a method of a class ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Can&#39;t do it. You&#39;ll get a compilation error.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;113. How many static initializers can you have ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;As many as you want, but the static initializers and class variable initializers are executed in textual order and may not refer to class variables declared in the class whose declarations appear textually after the use, even though these class variables are in scope.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;114. What is the difference between method overriding and overloading?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Overriding is a method with the same name and arguments as in a parent, whereas overloading is the same method name but different arguments&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;115. What is constructor chaining and how is it achieved in Java ?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A child object constructor always first needs to construct its parent (which in turn calls its parent constructor.). In Java it is done via an implicit call to the no-args constructor as the first statement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;116. What is the difference between the Boolean &amp;amp; operator and the &amp;amp;&amp;amp; operator?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;If an expression involving the Boolean &amp;amp; operator is evaluated, both operands are evaluated. Then the &amp;amp; operator is applied to the operand. When an expression involving the &amp;amp;&amp;amp; operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The &amp;amp;&amp;amp; operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;117. Which Java operator is right associative?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The = operator is right associative.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;118. Can a double value be cast to a byte?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes, a double value can be cast to a byte.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;119. What is the difference between a break statement and a continue statement?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;break&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;statement results in the termination of the statement to which it applies (switch, for, do, or while). A&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;continue&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;statement is used to end the current loop iteration and return control to the loop statement.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;120. Can a for statement loop indefinitely?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Yes, a for statement can loop indefinitely. For example, consider the following:&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;for(;;);&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;121. To what value is a variable of the String type automatically initialized?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The default value of an String type is null.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;122. What is the difference between a field variable and a local variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A field variable is a variable that is declared as a member of a class. A local variable is a variable that is declared local to a method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;123. How are this() and super() used with constructors?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;this()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;is used to invoke a constructor of the same class.&lt;span class=&quot;apple-converted-space&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;; font-size: 10pt;&quot;&gt;super()&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;is used to invoke a superclass constructor.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;124. What does it mean that a class or member is final?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;A final class cannot be inherited. A final method cannot be overridden in a subclass. A final field cannot be changed after it&#39;s initialized, and it must include an initializer statement where it&#39;s declared.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;125. What does it mean that a method or class is abstract?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;An abstract class cannot be instantiated. Abstract methods may only be included in abstract classes. However, an abstract class is not required to have any abstract methods, though most of them do. Each subclass of an abstract class must override the abstract methods of its superclasses or it also should be declared abstract.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;126. What is a transient variable?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;Transient variable is a variable that may not be serialized.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;/span&gt;127. How does Java handle integer overflows and underflows?&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;128. What is the difference between the &amp;gt;&amp;gt; and &amp;gt;&amp;gt;&amp;gt; operators?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The &amp;gt;&amp;gt; operator carries the sign bit when shifting right. The &amp;gt;&amp;gt;&amp;gt; zero-fills bits that have been shifted out.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;tech-question&quot; style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;129. Is sizeof a keyword?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 9pt;&quot;&gt;The sizeof operator is not a keyword.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 12.75pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/4245002278740256290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/core-java-interview-questions-and.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/4245002278740256290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/4245002278740256290'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/core-java-interview-questions-and.html' title='Core java interview questions and answers'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-564656328448207551</id><published>2012-12-12T04:39:00.000-08:00</published><updated>2012-12-12T04:39:12.253-08:00</updated><title type='text'>Top 50 Android Interview Questions Answers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #777777; font-family: &#39;Droid Sans&#39;, arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;1) What is Android?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
It is an open-sourced operating system that is used primarily on mobile devices, such as cell phones and tablets. It is a Linux kernel-based system that’s been equipped with rich components that allows developers to create and run apps that can perform both basic and advanced functions.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;span id=&quot;more-261&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2) What Is the Google Android SDK?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The Google Android SDK is a toolset that developers need in order to write apps on Android enabled devices. It contains a graphical interface that emulates an Android driven handheld environment, allowing them to test and debug their codes.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;3) What is the Android Architecture?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Android Architecture is made up of 4 key components:&lt;br /&gt;- Linux Kernel&lt;br /&gt;- Libraries&lt;br /&gt;- Android Framework&lt;br /&gt;- Android Applications&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;4) Describe the Android Framework.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The Android Framework is an important aspect of the Android Architecture. Here you can find all the classes and methods that developers would need in order to write applications on the Android environment.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;5) What is AAPT?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
AAPT is short for Android Asset Packaging Tool. This tool provides developers with the ability to deal with zip-compatible archives, which includes creating, extracting as well as viewing its contents.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;6) What is the importance of having an emulator within the Android environment?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The emulator lets developers “play” around an interface that acts as if it were an actual mobile device. They can write and test codes, and even debug. Emulators are a safe place for testing codes especially if it is in the early design phase.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;7) What is the use of an activityCreator?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
An activityCreator is the first step towards the creation of a new Android project. It is made up of a shell script that will be used to create new file system structure necessary for writing codes within the Android IDE.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;8 ) Describe Activities.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Activities are what you refer to as the window to a user interface. Just as you create windows in order to display output or to ask for an input in the form of dialog boxes, activities play the same role, though it may not always be in the form of a user interface.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;9) What are Intents?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Intents displays notification messages to the user from within the Android enabled device. It can be used to alert the user of a particular state that occurred. Users can be made to respond to intents.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;10) Differentiate Activities from Services.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Activities can be closed, or terminated anytime the user wishes. On the other hand, services are designed to run behind the scenes, and can act independently. Most services run continuously, regardless of whether there are certain or no activities being executed.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;11) What items are important in every Android project?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
These are the essential items that are present each time an Android project is created:&lt;br /&gt;- AndroidManifest.xml&lt;br /&gt;- build.xml&lt;br /&gt;- bin/&lt;br /&gt;- src/&lt;br /&gt;- res/&lt;br /&gt;- assets/&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;12) What is the importance of XML-based layouts?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The use of XML-based layouts provides a consistent and somewhat standard means of setting GUI definition format. In common practice, layout details are placed in XML files while other items are placed in source files.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;13) What are containers?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Containers, as the name itself implies, holds objects and widgets together, depending on which specific items are needed and in what particular arrangement that is wanted. Containers may hold labels, fields, buttons, or even child containers, as examples.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;14) What is Orientation?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Orientation, which can be set using setOrientation(), dictates if the LinearLayout is represented as a row or as a column. Values are set as either HORIZONTAL or VERTICAL.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;15) What is the importance of Android in the mobile market?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Developers can write and register apps that will specifically run under the Android environment. This means that every mobile device that is Android enabled will be able to support and run these apps. With the growing popularity of Android mobile devices, developers can take advantage of this trend by creating and uploading their apps on the Android Market for distribution to anyone who wants to download it.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;16) What do you think are some disadvantages of Android?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Given that Android is an open-source platform, and the fact that different Android operating systems have been released on different mobile devices, there’s no clear cut policy to how applications can adapt with various OS versions and upgrades. One app that runs on this particular version of Android OS may or may not run on another version. Another disadvantage is that since mobile devices such as phones and tabs come in different sizes and forms, it poses a challenge for developers to create apps that can adjust correctly to the right screen size and other varying features and specs.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;17) What is adb?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Adb is short for Android Debug Bridge. It allows developers the power to execute remote shell commands. Its basic function is to allow and control communication towards and from the emulator port.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;18) What are the four essential states of an activity?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
- Active – if the activity is at the foreground&lt;br /&gt;- Paused – if the activity is at the background and still visible&lt;br /&gt;- Stopped – if the activity is not visible and therefore is hidden or obscured by another activity&lt;br /&gt;- Destroyed – when the activity process is killed or completed terminated&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;19) What is ANR?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
ANR is short for Application Not Responding. This is actually a dialog that appears to the user whenever an application have been unresponsive for a long period of time.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;20) Which elements can occur only once and must be present?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Among the different elements, the and elements must be present and can occur only once. The rest are optional, and can occur as many times as needed.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;21) How are escape characters used as attribute?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Escape characters are preceded by double backslashes. For example, a newline character is created using ‘\\n’&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;22) What is the importance of settings permissions in app development?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Permissions allow certain restrictions to be imposed primarily to protect data and code. Without these, codes could be compromised, resulting to defects in functionality.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;23) What is the function of an intent filter?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Because every component needs to indicate which intents they can respond to, intent filters are used to filter out intents that these components are willing to receive. One or more intent filters are possible, depending on the services and activities that is going to make use of it.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;24) Enumerate the three key loops when monitoring an activity&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
- Entire lifetime – activity happens between onCreate and onDestroy&lt;br /&gt;- Visible lifetime – activity happens between onStart and onStop&lt;br /&gt;- Foreground lifetime – activity happens between onResume and onPause&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;25) When is the onStop() method invoked?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
A call to onStop method happens when an activity is no longer visible to the user, either because another activity has taken over or if in front of that activity.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;26) Is there a case wherein other qualifiers in multiple resources take precedence over locale?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Yes, there are actually instances wherein some qualifiers can take precedence over locale. There are two known exceptions, which are the MCC (mobile country code) and MNC (mobile network code) qualifiers.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;27) What are the different states wherein a process is based?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
There are 4 possible states:&lt;br /&gt;- foreground activity&lt;br /&gt;- visible activity&lt;br /&gt;- background activity&lt;br /&gt;- empty process&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;28) How can the ANR be prevented?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
One technique that prevents the Android system from concluding a code that has been responsive for a long period of time is to create a child thread. Within the child thread, most of the actual workings of the codes can be placed, so that the main thread runs with minimal periods of unresponsive times.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;29) What role does Dalvik play in Android development?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Dalvik serves as a virtual machine, and it is where every Android application runs. Through Dalvik, a device is able to execute multiple virtual machines efficiently through better memory management.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;30) What is the AndroidManifest.xml?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
This file is essential in every application. It is declared in the root directory and contains information about the application that the Android system must know before the codes can be executed.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;31) What is the proper way of setting up an Android-powered device for app development?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The following are steps to be followed prior to actual application development in an Android-powered device:&lt;br /&gt;-Declare your application as “debuggable” in your Android Manifest.&lt;br /&gt;-Turn on “USB Debugging” on your device.&lt;br /&gt;-Set up your system to detect your device.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;32) Enumerate the steps in creating a bounded service through AIDL.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
1. create the .aidl file, which defines the programming interface&lt;br /&gt;2. implement the interface, which involves extending the inner abstract Stub class as well as implanting its methods.&lt;br /&gt;3. expose the interface, which involves implementing the service to the clients.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;33) What is the importance of Default Resources?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
When default resources, which contain default strings and files, are not present, an error will occur and the app will not run. Resources are placed in specially named subdirectories under the project res/ directory.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;34) When dealing with multiple resources, which one takes precedence?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Assuming that all of these multiple resources are able to match the configuration of a device, the ‘locale’ qualifier almost always takes the highest precedence over the others.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;35) When does ANR occur?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The ANR dialog is displayed to the user based on two possible conditions. One is when there is no response to an input event within 5 seconds, and the other is when a broadcast receiver is not done executing within 10 seconds.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;36) What is AIDL?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
AIDL, or Android Interface Definition Language, handles the interface requirements between a client and a service so both can communicate at the same level through interprocess communication or IPC. This process involves breaking down objects into primitives that Android can understand. This part is required simply because a process cannot access the memory of the other process.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;37) What data types are supported by AIDL?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
AIDL has support for the following data types:&lt;br /&gt;-string&lt;br /&gt;-charSequence&lt;br /&gt;-List&lt;br /&gt;-Map&lt;br /&gt;-all native Java data types like int,long, char and Boolean&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;38) What is a Fragment?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
A fragment is a part or portion of an activity. It is modular in a sense that you can move around or combine with other fragments in a single activity. Fragments are also reusable.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;39) What is a visible activity?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
A visible activity is one that sits behind a foreground dialog. It is actually visible to the user, but not necessarily being in the foreground itself.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;40) When is the best time to kill a foreground activity?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The foreground activity, being the most important among the other states, is only killed or terminated as a last resort, especially if it is already consuming too much memory. When a memory paging state has been reach by a foreground activity, then it is killed so that the user interface can retain its responsiveness to the user.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;41) Is it possible to use or add a fragment without using a user interface?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Yes, it is possible to do that, such as when you want to create a background behavior for a particular activity. You can do this by using add(Fragment,string) method to add a fragment from the activity.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;42) How do you remove icons and widgets from the main screen of the Android device?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
To remove an icon or shortcut, press and hold that icon. You then drag it downwards to the lower part of the screen where a remove button appears.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;43) What are the core components under the Android application architecture?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
There are 5 key components under the Android application architecture:&lt;br /&gt;- services&lt;br /&gt;- intent&lt;br /&gt;- resource externalization&lt;br /&gt;- notifications&lt;br /&gt;- content providers&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;44) What composes a typical Android application project?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
A project under Android development, upon compilation, becomes an .apk file. This apk file format is actually made up of the AndroidManifest.xml file, application code, resource files, and other related files.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;45) What is a Sticky Intent?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
A Sticky Intent is a broadcast from sendStickyBroadcast() method such that the intent floats around even after the broadcast, allowing others to collect data from it.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;46) Do all mobile phones support the latest Android operating system?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Some Android-powered phone allows you to upgrade to the higher Android operating system version. However, not all upgrades would allow you to get the latest version. It depends largely on the capability and specs of the phone, whether it can support the newer features available under the latest Android version.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;47) What is portable wi-fi hotspot?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Portable Wi-Fi Hotspot allows you to share your mobile internet connection to other wireless device. For example, using your Android-powered phone as a Wi-Fi Hotspot, you can use your laptop to connect to the Internet using that access point.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;48) What is an action?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
In Android development, an action is what the intent sender wants to do or expected to get as a response. Most application functionality is based on the intended action.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;49) What is the difference between a regular bitmap and a nine-patch image?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
In general, a Nine-patch image allows resizing that can be used as background or other image size requirements for the target device. The Nine-patch refers to the way you can resize the image: 4 corners that are unscaled, 4 edges that are scaled in 1 axis, and the middle one that can be scaled into both axes.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font-weight: bold; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;50) What language is supported by Android for application development?&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 15px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The main language supported is Java programming language. Java is the most popular language for app development, which makes it ideal even for new Android developers to quickly learn to create and deploy applications in the Android environment.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/564656328448207551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/top-50-android-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/564656328448207551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/564656328448207551'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/12/top-50-android-interview-questions.html' title='Top 50 Android Interview Questions Answers'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-8003036284608635241</id><published>2012-10-30T01:10:00.004-07:00</published><updated>2012-10-30T01:10:58.743-07:00</updated><title type='text'>JSP INTERVIEW QUESTIONS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
These are collections of interview questions and answers regarding JSP.&lt;/h4&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcwoS0J2ObNzwDoPqWT9h6u3AartbP87zdjPcBfHnA1PhEihxtwJXfLu6kQvDcPzJvWbLvI7TDPtgcJvNEgLo8vgdE-f18Lnhyphenhyphen7bAvfwuZbus9RldHrVJX4gV1u-G0_5oaueAc6lZ20WM/s1600/images.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcwoS0J2ObNzwDoPqWT9h6u3AartbP87zdjPcBfHnA1PhEihxtwJXfLu6kQvDcPzJvWbLvI7TDPtgcJvNEgLo8vgdE-f18Lnhyphenhyphen7bAvfwuZbus9RldHrVJX4gV1u-G0_5oaueAc6lZ20WM/s1600/images.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is &amp;nbsp;JSP and its used for?&lt;/b&gt;&lt;br /&gt;
Java Server Pages (JSP) is a platform independent presentation layer technology
that comes with SUN s J2EE platform. JSPs are normal HTML pages with Java code
pieces embedded in them. JSP pages are saved to *.jsp files. A JSP compiler is
used in the background to generate a Servlet from the JSP page.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What are the two
kinds of comments in JSP?&lt;/b&gt;&lt;br /&gt;
&amp;lt;%-- JSP Comment --%&amp;gt;&lt;br /&gt;
&amp;lt;!-- HTML Comment --&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;What is JSP
technology?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Java Server Page is a standard Java extension that is
defined on top of the servlet Extensions. The goal of JSP is the simplified
creation and management of dynamic Web pages. JSPs are secure,
platform-independent, and best of all, make use of Java as a server-side
scripting language.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is JSP page?&lt;br /&gt;
&lt;/b&gt;A JSP page is a text-based document that contains two types of text: static
template data, which can be expressed in any text-based format such as HTML,
SVG, WML, and XML, and JSP elements, which construct dynamic content.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;How many &amp;nbsp;implicit objects in JSP?&lt;/b&gt;&lt;br /&gt;
Implicit objects are objects that are created by the web container and contain
information related to a particular request, page, or application. They are:&lt;br /&gt;
1. request&lt;br /&gt;
2. response&lt;br /&gt;
3. pageContext&lt;br /&gt;
4. session&lt;br /&gt;
5. application&lt;br /&gt;
6. out&lt;br /&gt;
7. config&lt;br /&gt;
8. page&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;9. exception&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;How many JSP
scripting elements and what are they?&lt;br /&gt;
&lt;/b&gt;There are three scripting language elements:&lt;br /&gt;
--declarations&lt;br /&gt;
--scriptlets&lt;br /&gt;
--expressions&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;Why are JSP pages preferred
API for creating a web-based client program?&lt;br /&gt;
&lt;/b&gt;Because no plug-ins or security policy files are needed on the client
systems(applet does). Also, JSP pages enable cleaner and more module
application design because they provide a way to separate applications
programming from web page design. This means personnel involved in web page
design do not need to understand Java programming language syntax to do their
jobs.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;Is &amp;nbsp;JSP technology extensible?&lt;br /&gt;
&lt;/b&gt;YES. JSP technology is extensible through the development of custom
actions, or tags, which are encapsulated in tag libraries.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;Can we use the
constructor, instead of init(), to initialize servlet?&lt;/b&gt;&lt;br /&gt;
Yes , of course you can use the constructor instead of init(). There’s nothing
to stop you. But you shouldn’t. The original reason for init() was that ancient
versions of Java couldn’t dynamically invoke constructors with arguments, so
there was no way to give the constructur a ServletConfig. That no longer
applies, but servlet containers still will only call your no-arg constructor.
So you won’t have access to a ServletConfig or ServletContext.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Can you explain What
is JSP page life cycle? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;When first
time a JSP page is request necessary servlet code is generated and loaded in
the servlet container. Now until the JSP page is not changed the compiled
servlet code serves any request which comes from the browser. When you again
change the JSP page the JSP engine again compiles a servlet code for the same.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;JSP page is
first initialized by jspInit() method. This initializes the JSP in much the
same way as servlets are initialized, when the first request is intercepted and
just after translation.&lt;br /&gt;
&lt;br /&gt;
Every time a request comes to the JSP, the container generated _jspService()
method is invoked, the request is processed, and response generated.&lt;br /&gt;
&lt;br /&gt;
When the JSP is destroyed by the server, the jspDestroy() method is called and
this can be used for clean up purposes.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: .0001pt; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;How do I include static files within a JSP
page?&lt;/b&gt;&lt;br /&gt;
Static resources should always be included using the JSP include directive.
This way, the inclusion is performed just once during the translation phase. Do
note that you should always supply a relative URL for the file attribute.
Although you can also include static resources using the action, this is not
advisable as the inclusion is then performed for each and every request.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;Why does JComponent
have add() and remove() methods but Component does not?&lt;/b&gt;&lt;br /&gt;
because JComponent is a subclass of Container, and can contain other components
and jcomponents. How can I implement a thread-safe JSP page? - You can make
your JSPs thread-safe by having them implement the SingleThreadModel interface.
This is done by adding the directive &amp;lt;%@ page isThreadSafe=&quot;false&quot;
% &amp;gt; within your JSP page.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;How do I prevent the
output of my JSP or Servlet pages from being cached by the browser?&lt;/b&gt;&lt;br /&gt;
You will need to set the appropriate HTTP header attributes to prevent the
dynamic content output by the JSP page from being cached by the browser. Just
execute the following scriptlet at the beginning of your JSP pages to prevent
them from being cached at the browser. You need both the statements to take
care of some of the older browser versions.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;How do you restrict
page errors display in the JSP page?&lt;br /&gt;
&lt;/b&gt;You first set &quot;Errorpage&quot; attribute of PAGE directory to the name
of the error page (ie Errorpage=&quot;error.jsp&quot;)in your jsp page .Then in
the error jsp page set &quot;isErrorpage=TRUE&quot;. When an error occur in
your jsp page it will automatically call the error page.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What do you
understand by JSP Actions?&lt;/b&gt;&lt;br /&gt;
JSP actions are XML tags that direct the server to use existing components or
control the behavior of the JSP engine. JSP Actions consist of a typical
(XML-based) prefix of &quot;jsp&quot; followed by a colon, followed by the
action name followed by one or more attribute parameters.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;There are six JSP Actions:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;jsp:include/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;jsp:forward/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;jsp:plugin/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;jsp:usebean/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;jsp:setProperty/&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;jsp:getProperty/&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is the
difference between&amp;nbsp;&amp;lt;jsp:include page = ... &amp;gt;&amp;nbsp;and&lt;br /&gt;
&amp;lt;%@ include file = ... &amp;gt;?.&lt;br /&gt;
&lt;/b&gt;Both the tag includes the information from one page in another. The
differences are as follows:&lt;br /&gt;
&amp;lt;jsp:include page = ... &amp;gt;:&amp;nbsp;This is like a function call from one jsp
to another jsp. It is executed ( the included page is executed&amp;nbsp; and the
generated html content is included in the content of calling jsp) each time the
client page is accessed by the client. This approach is useful to for
modularizing the web application. If the included file changed then the new
content will be included in the output.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%@ include file = ... &amp;gt;: In this case the content of the included file
is textually embedded in the page that have &amp;lt;%@ include file=&quot;..&quot;&amp;gt;
directive. In this case in the included file changes, the changed content will
not included in the output. This approach is used when the code from one jsp
file required to include in multiple jsp files.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is the
difference between&amp;nbsp;&amp;lt;jsp:forward page = ... &amp;gt;&amp;nbsp;and&lt;br /&gt;
response.sendRedirect(url),?.&lt;/b&gt;&lt;br /&gt;
The &amp;lt;jsp:forward&amp;gt; element forwards the request object containing the
client request information from one JSP file to another file. The target file
can be an HTML file, another JSP file, or a servlet, as long as it is in the
same application context as the forwarding JSP file.&lt;br /&gt;
sendRedirect&amp;nbsp;sends HTTP temporary redirect response to the browser, and
browser creates a new request to go the redirected page. The&amp;nbsp;
response.sendRedirect kills the session variables.&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;&lt;span style=&quot;background: yellow; mso-highlight: yellow;&quot;&gt;implicit Objects&lt;/span&gt; &lt;/b&gt;&lt;br /&gt;
Implicit objects are the objects available to the JSP page. These objects are
created by Web container and contain information related to a particular
request, page, or application. The JSP implicit objects are:&lt;/span&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;background: #FFFFCC; border: outset maroon 1.0pt; mso-border-alt: outset maroon .75pt; mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 654px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;background: yellow; border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Variable&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: yellow; border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Class&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;background: yellow; border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Description&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;application&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;javax.servlet.ServletContext&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;The context for the JSP page&#39;s servlet and any Web
  components contained in the same application.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;config&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;javax.servlet.ServletConfig&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Initialization information for the JSP page&#39;s servlet.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;exception&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;java.lang.Throwable&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Accessible only from an error page.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;out&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;javax.servlet.jsp.JspWriter&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;The output stream.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;page&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;java.lang.Object&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;The instance of the JSP page&#39;s servlet processing the
  current request. Not typically used by JSP page authors.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;pageContext&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;javax.servlet.jsp.PageContext&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;The context for the JSP page. Provides a single API to
  manage the various scoped attributes.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;request&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Subtype of javax.servlet.ServletRequest&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;The request triggering the execution of the JSP page.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;response&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;Subtype of javax.servlet.ServletResponse&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;The response to be returned to the client. Not typically
  used by JSP page authors.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 58.5pt;&quot; width=&quot;78&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;session&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 140.25pt;&quot; width=&quot;187&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;javax.servlet.http.HttpSession&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;border: inset maroon 1.0pt; mso-border-alt: inset maroon .75pt; padding: 0in 0in 0in 0in; width: 285.75pt;&quot; width=&quot;381&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;The session object for the client.&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What are all the
different scope values for the &amp;lt;jsp:useBean&amp;gt; tag?&lt;/b&gt;&lt;br /&gt;
&amp;lt;jsp:useBean&amp;gt; tag is used to use any java object in the jsp page. Here
are the scope values for &amp;lt;jsp:useBean&amp;gt; tag:&lt;br /&gt;
a) page&lt;br /&gt;
b) request&lt;br /&gt;
c) session and&lt;br /&gt;
d) application&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is JSP Output
Comments?&lt;/b&gt;&lt;br /&gt;
JSP Output Comments are the comments that can be viewed in the HTML source
file.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;!-- This file displays the user login screen --&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;!-- This page was loaded on&lt;br /&gt;
&amp;lt;%= (new java.util.Date()).toLocaleString() %&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is expression in
JSP?&lt;/b&gt;&lt;br /&gt;
Expression tag is used to insert Java values directly into the output. Syntax
for the Expression tag is:&lt;br /&gt;
&amp;lt;%= expression %&amp;gt;&lt;br /&gt;
An expression tag contains a scripting language expression that is evaluated,
converted to a String, and inserted where the expression appears in the JSP
file. The following expression tag displays time on the output:&lt;br /&gt;
&amp;lt;%=new java.util.Date()%&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What types of
comments are available in the JSP?&lt;/b&gt;&lt;br /&gt;
There are two types of comments are allowed in the JSP. These are&amp;nbsp;hidden&amp;nbsp;and&amp;nbsp;outputcomments.
A hidden comments does not appear in the generated output in the html, while
output comments appear in the generated output.&lt;br /&gt;
Example of hidden comment:&lt;br /&gt;
&amp;lt;%-- This is hidden comment --%&amp;gt;&lt;br /&gt;
Example of output comment:&lt;br /&gt;
&amp;lt;!-- This is output comment --&amp;gt;&lt;br /&gt;
&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is JSP
declaration?&lt;/b&gt;&lt;br /&gt;
JSP Decleratives are the JSP tag used to declare variables. Declaratives are
enclosed in the &amp;lt;%! %&amp;gt; tag and ends in semi-colon. You declare variables
and functions in the declaration tag and can use anywhere in the JSP. Here is
the example of declaratives:&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;%@page contentType=&quot;text/html&quot; %&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;%!&lt;br /&gt;
int cnt=0;&lt;br /&gt;
private int getCount(){&lt;br /&gt;
//increment cnt and return the value&lt;br /&gt;
cnt++;&lt;br /&gt;
return cnt;&lt;br /&gt;
}&lt;br /&gt;
%&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;p&amp;gt;Values of Cnt are:&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;p&amp;gt;&amp;lt;%=getCount()%&amp;gt;&amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What is JSP
Scriptlet?&lt;/b&gt;&lt;br /&gt;
JSP Scriptlet is jsp tag which is used to enclose java code in the JSP pages.
Scriptlets begins with&amp;nbsp;&amp;lt;%&amp;nbsp;tag and ends with&amp;nbsp;%&amp;gt;&amp;nbsp;tag.
Java code written inside scriptlet executes every time the JSP is invoked.&lt;br /&gt;
Example:&lt;br /&gt;
&amp;nbsp; &amp;lt;%&lt;br /&gt;
&amp;nbsp; //java codes&lt;br /&gt;
&amp;nbsp;&amp;nbsp; String userName=null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; userName=request.getParameter(&quot;userName&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; %&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;b&gt;What are the
life-cycle methods of JSP?&lt;/b&gt;&lt;br /&gt;
Life-cycle methods of the JSP are:&lt;br /&gt;
a)&amp;nbsp;jspInit(): The container calls the jspInit() to initialize the servlet
instance. It is called before any other method, and is called only once for a
servlet instance.&lt;br /&gt;
b)_jspService():&amp;nbsp;The container calls the _jspservice() for each request
and it passes the request and the response objects. _jspService() method cann&#39;t
be overridden.&lt;br /&gt;
c)&amp;nbsp;jspDestroy():&amp;nbsp;The container calls this when its instance is about
to destroyed.&lt;br /&gt;
The jspInit() and jspDestroy() methods can be overridden within a JSP page.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/8003036284608635241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/jsp-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8003036284608635241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8003036284608635241'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/jsp-interview-questions.html' title='JSP INTERVIEW QUESTIONS'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcwoS0J2ObNzwDoPqWT9h6u3AartbP87zdjPcBfHnA1PhEihxtwJXfLu6kQvDcPzJvWbLvI7TDPtgcJvNEgLo8vgdE-f18Lnhyphenhyphen7bAvfwuZbus9RldHrVJX4gV1u-G0_5oaueAc6lZ20WM/s72-c/images.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-8996465895095001392</id><published>2012-10-26T04:36:00.000-07:00</published><updated>2012-10-26T04:36:21.062-07:00</updated><title type='text'>HOW TO SEND EMAIL USING JSP </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Create a new java web project and create index.jsp page, Then copy the below code and paste in the index.jsp page.&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;%@page contentType=&quot;text/html&quot; pageEncoding=&quot;UTF-8&quot;%&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;!DOCTYPE html&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;html&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;head&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;title&amp;gt;Pankaj Bhardwaj&amp;lt;/title&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/head&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;body&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;table border=&quot;1&quot; width=&quot;50%&quot; &amp;nbsp;cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;100%&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;form method=&quot;POST&quot; action=&quot;mail.jsp&quot;&amp;gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;table border=&quot;1&quot; width=&quot;100%&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;h1&amp;gt;TEST&amp;lt;/h1&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;b&amp;gt;To:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;to&quot; size=&quot;30&quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;b&amp;gt;From:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;from&quot; size=&quot;30&quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;b&amp;gt;Subject:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;subject&quot; size=&quot;30&quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;b&amp;gt;Description:&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td width=&quot;50%&quot;&amp;gt;&amp;lt;textarea name=&quot;description&quot; type=&quot;text&quot;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; cols=&quot;40&quot; rows=&quot;15&quot; size=100&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/textarea&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;td&amp;gt;&amp;lt;p&amp;gt;&amp;lt;input type=&quot;submit&quot; value=&quot;Send Mail&quot; name=&quot;sendMail&quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/table&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/p&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/form&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/td&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;lt;/tr&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/table&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/body&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
Now, Create another jsp page naming mail.jsp and copy and paste the below code in this page.&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&amp;lt;%@ page language=&quot;java&quot; import=&quot;javax.naming.*,java.io.*,javax.mail.*,&lt;/div&gt;
&lt;div&gt;
javax.mail.internet.*,com.sun.mail.smtp.*&quot;%&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;html&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;head&amp;gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;lt;title&amp;gt;Mail&amp;lt;/title&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/head&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;body&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;%&lt;/div&gt;
&lt;div&gt;
try{&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; Session mailSession = Session.getInstance(System.getProperties());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; Transport transport = new SMTPTransport(mailSession,new URLName(&quot;localhost&quot;));&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; transport.connect(&quot;localhost&quot;,8084,null,null);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; MimeMessage m = new MimeMessage(mailSession);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; m.setFrom(new InternetAddress(%&amp;gt;&amp;lt;%request.getParameter(&quot;from&quot;)%&amp;gt;&amp;lt;%));&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; Address[] toAddr = new InternetAddress[] {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; new InternetAddress(%&amp;gt;&amp;lt;%request.getParameter(&quot;to&quot;)%&amp;gt;&amp;lt;%)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; };&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; m.setRecipients(javax.mail.Message.RecipientType.TO, toAddr );&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; m.setSubject(%&amp;gt;&amp;lt;%request.getParameter(&quot;subject&quot;)%&amp;gt;&amp;lt;%);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; m.setSentDate(new java.util.Date());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; m.setContent(%&amp;gt;&amp;lt;%request.getParameter(&quot;description&quot;)%&amp;gt;&amp;lt;%, &quot;text/plain&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; transport.sendMessage(m,m.getAllRecipients());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; transport.close();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; out.println(&quot;Thanks for sending mail!&quot;);&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
catch(Exception e){&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; out.println(e.getMessage());&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; e.printStackTrace();&lt;/div&gt;
&lt;div&gt;
}&lt;/div&gt;
&lt;div&gt;
%&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/body&amp;gt;&lt;/div&gt;
&lt;div&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;NOTE: you must add the activation.jar and mail.jar file in your libraries. Otherwise the code will not work properly&lt;/b&gt;.&lt;/h3&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMlLlwSCBon1WhvhVKOfvGTZ1rfrgluQt1_lxDStb5de9WyAkTbdRjvtZmBtomK83ijDUjY-BPyntWdJuLZIbQhouzVc1USBC5jZsTAErw7r72yItc-dtJDPYbF4k7ckb7QmXEgP-eZiI/s1600/jsp.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;254&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMlLlwSCBon1WhvhVKOfvGTZ1rfrgluQt1_lxDStb5de9WyAkTbdRjvtZmBtomK83ijDUjY-BPyntWdJuLZIbQhouzVc1USBC5jZsTAErw7r72yItc-dtJDPYbF4k7ckb7QmXEgP-eZiI/s320/jsp.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/8996465895095001392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/how-to-send-email-using-jsp.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8996465895095001392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8996465895095001392'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/how-to-send-email-using-jsp.html' title='HOW TO SEND EMAIL USING JSP '/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMlLlwSCBon1WhvhVKOfvGTZ1rfrgluQt1_lxDStb5de9WyAkTbdRjvtZmBtomK83ijDUjY-BPyntWdJuLZIbQhouzVc1USBC5jZsTAErw7r72yItc-dtJDPYbF4k7ckb7QmXEgP-eZiI/s72-c/jsp.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-1301727817892486085</id><published>2012-10-18T11:54:00.003-07:00</published><updated>2012-10-18T11:55:46.980-07:00</updated><title type='text'>Login with User Name and Password field in java.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Times, Times New Roman, serif; font-size: x-large;&quot;&gt;
This is only the code behind login button &amp;nbsp;!!!&lt;/span&gt;&lt;/h2&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
If you wish to make login page then use this, Simple code for access in a web using user name and password with database connectivity using stored procedure..&amp;nbsp;&lt;/h4&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div&gt;
&lt;b style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;private void jButton2ActionPerformed(java.&lt;wbr&gt;&lt;/wbr&gt;awt.event.ActionEvent evt) { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;b style=&quot;background-color: white; font-family: arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO add your handling code here:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String user = jTextField2.getText();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String strpass = jPasswordField2.getText();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO add your handling code here:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Connection con = DBConnection.getDBConnection()&lt;wbr&gt;&lt;/wbr&gt;;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CallableStatement cs = con.prepareCall(&quot;{call USP_LOGIN(?,?)}&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(1, user);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(2, strpass);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.executeQuery();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSet rs = cs.getResultSet();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; boolean recordfound = rs.next();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(recordfound)&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; { Desktop.removeAll(); &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;Desktop.repaint(); &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;Home home = new Home();&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;home.setBounds(0, 0, 1280, 980);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;Desktop.add(home); &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;home.setVisible(true);&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;home.jLabel1.setText(&quot;WELCOME : &quot;+user);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jLabel10.setText(&quot;Invalid User ID And Password&quot;);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (SQLException ex) {&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Logger.getLogger(index.class.&lt;wbr&gt;&lt;/wbr&gt;getName()).log(Level.SEVERE, null, ex);&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/1301727817892486085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/login-with-user-name-and-password-field.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1301727817892486085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1301727817892486085'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/login-with-user-name-and-password-field.html' title='Login with User Name and Password field in java.'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-3973530175122802088</id><published>2012-10-18T00:17:00.002-07:00</published><updated>2012-10-18T00:17:26.136-07:00</updated><title type='text'>Jtable from Database using stored procedure.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Dynamically populate jtable from database with data elements in JAVA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import java.sql.CallableStatement;&lt;br /&gt;
import java.sql.Connection;&lt;br /&gt;
import java.sql.ResultSet;&lt;br /&gt;
import java.sql.ResultSetMetaData;&lt;br /&gt;
import java.util.Vector;&lt;br /&gt;
import javax.swing.JTable;&lt;br /&gt;
import javax.swing.table.DefaultTableModel;&lt;br /&gt;
import javax.swing.table.TableColumn;&lt;br /&gt;
&lt;br /&gt;
/**&lt;br /&gt;
&amp;nbsp;*&lt;br /&gt;
&amp;nbsp;* @author Pankaj&lt;br /&gt;
&amp;nbsp;*/&lt;br /&gt;
public class ManageInvoice extends javax.swing.JPanel {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; /**&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;* Creates new form ManageInvoice&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;br /&gt;
&amp;nbsp; &amp;nbsp; public ManageInvoice() {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; initComponents();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vector columnNames = new Vector();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vector data = new Vector();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Connection conn=DBConnection.getDBConnection(); &amp;nbsp; &amp;nbsp; &amp;nbsp;// DBConnection class with static method &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //getDBConnection declaring database path &amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //and username and password.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String sql = &quot;{CALL USP_MANAGE_INVOICE()}&quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CallableStatement stmt=conn.prepareCall(sql); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //If you are using stored procedure&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSet rs = stmt.executeQuery();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ResultSetMetaData md = rs.getMetaData();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int columns = md.getColumnCount();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; columnNames.add(&quot;S.NO.&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 2; i &amp;lt;= columns; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; columnNames.addElement( md.getColumnName(i) );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int j =1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (rs.next())&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Vector row = new Vector(columns);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row.add(j++);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 2; i &amp;lt;= columns; i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row.addElement( rs.getObject(i) );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; row.add(5, new Boolean(true));&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; data.addElement( row );&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rs.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; stmt.close();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch(Exception e)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(e);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DefaultTableModel model = new DefaultTableModel(data, columnNames);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; JTable table = new JTable(model)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;Returning the Class of each column will allow different&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;renderers to be used based on Class&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public Class getColumnClass(int c)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return getValueAt(0, c).getClass();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; public boolean isCellEditable(int row, int col) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //Note that the data/cell address is constant,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //no matter where the cell appears onscreen.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (col &amp;gt; 0) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.print(&quot;hi&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.print(&quot;hi2&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TableColumn col;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for (int i = 0; i &amp;lt; table.getColumnCount(); i++)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; col = table.getColumnModel().getColumn(i);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; col.setMaxWidth(250);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jScrollPane1.setViewportView(table);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/3973530175122802088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/jtable-from-database-using-stored.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/3973530175122802088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/3973530175122802088'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/jtable-from-database-using-stored.html' title='Jtable from Database using stored procedure.'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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-7879263817955525601.post-7791795857031593090</id><published>2012-10-17T22:52:00.000-07:00</published><updated>2012-10-17T22:52:02.141-07:00</updated><title type='text'>Print button for pdf and dialog box</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;Print button in java for creating PDF with dialog box. just copy code and paste in a new java&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;h2&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;application to check out this button for pdf generating.&lt;/b&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiunRg5h1Wt4gnVusKAxAbJA6k7xZOM92KQln512waMdoNX2iQQNI-IQa5T-69DbO6T2NTqLUbFhg6nxIwGxQLqCT0NRAAodGhMM2EgZV9Rw1tgTu8HtiE1oWhrcQUwtwYsHsWQj0TUrRw/s1600/Windows7PDF.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;307&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiunRg5h1Wt4gnVusKAxAbJA6k7xZOM92KQln512waMdoNX2iQQNI-IQa5T-69DbO6T2NTqLUbFhg6nxIwGxQLqCT0NRAAodGhMM2EgZV9Rw1tgTu8HtiE1oWhrcQUwtwYsHsWQj0TUrRw/s320/Windows7PDF.gif&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.Color;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.Font;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.Graphics;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.Graphics2D;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.print.&lt;wbr&gt;&lt;/wbr&gt;PageFormat;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.print.&lt;wbr&gt;&lt;/wbr&gt;Printable;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.print.&lt;wbr&gt;&lt;/wbr&gt;PrinterException;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;import&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;java.awt.print.&lt;wbr&gt;&lt;/wbr&gt;PrinterJob;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;public&amp;nbsp;class&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;PrintableDemo1&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;im&lt;wbr&gt;&lt;/wbr&gt;plements&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Printable&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;public&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;int&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;print&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Graphics&amp;nbsp;g,&lt;wbr&gt;&lt;/wbr&gt;&amp;nbsp;PageFormat&amp;nbsp;pf,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;int&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;pageIndex&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;)&lt;wbr&gt;&lt;/wbr&gt;&amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;if&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;pageIndex&amp;nbsp;!=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #990000; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;)&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;return&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;NO_SUCH_PAGE;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Graphics2D&amp;nbsp;g2&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Graphics2&lt;wbr&gt;&lt;/wbr&gt;D&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;g;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;g2.setFont&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;new&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Font&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #2a00ff; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&quot;&lt;wbr&gt;&lt;/wbr&gt;Serif&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;,&amp;nbsp;Font.PLAIN,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #990000; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;36&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;))&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;g2.setPaint&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Color.black&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;g2.drawString&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #2a00ff; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&quot;Java&amp;nbsp;&lt;wbr&gt;&lt;/wbr&gt;Source&amp;nbsp;and&amp;nbsp;Support!&quot;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #990000; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;144&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #990000; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;144&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;wbr&gt;&lt;/wbr&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;return&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;PAGE_EXISTS;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;public&amp;nbsp;static&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;void&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;main&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Stri&lt;wbr&gt;&lt;/wbr&gt;ng&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;[]&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;args&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;)&amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;PrinterJob&amp;nbsp;pj&amp;nbsp;=&amp;nbsp;&lt;wbr&gt;&lt;/wbr&gt;PrinterJob.getPrinterJob&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;pj.setPrintable&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;new&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;Printa&lt;wbr&gt;&lt;/wbr&gt;bleDemo1&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;())&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;if&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;pj.printDialog&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;())&amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;try&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;{&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;pj.print&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;()&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #7f0055; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;b&gt;catch&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;PrinterExceptio&lt;wbr&gt;&lt;/wbr&gt;n&amp;nbsp;e&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;)&amp;nbsp;{&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;System.out.println&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;e&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;}&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: white; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;&lt;/span&gt;&lt;br style=&quot;background-color: white; color: #333333; font-family: monospace; font-size: 11px; white-space: nowrap;&quot; /&gt;&lt;span style=&quot;background-color: white; color: black; font-family: monospace; font-size: 11px; white-space: nowrap;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/7791795857031593090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/print-button-for-pdf-and-dialog-box.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/7791795857031593090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/7791795857031593090'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/print-button-for-pdf-and-dialog-box.html' title='Print button for pdf and dialog box'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiunRg5h1Wt4gnVusKAxAbJA6k7xZOM92KQln512waMdoNX2iQQNI-IQa5T-69DbO6T2NTqLUbFhg6nxIwGxQLqCT0NRAAodGhMM2EgZV9Rw1tgTu8HtiE1oWhrcQUwtwYsHsWQj0TUrRw/s72-c/Windows7PDF.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-8624876727075677629</id><published>2012-10-17T04:50:00.002-07:00</published><updated>2012-10-17T04:50:43.048-07:00</updated><title type='text'>COLLECTION RELATED INTERVIEW QUESTIONS.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheGbpxNTYfgjrH7egkIy3Q-iWcPQyselU4Q_4_lekBkg1uVx8bB4bvjULM4T0Opz6TcbuXmx4c2IseF38U7BRCeJu0N7WUJ3EbontJ4tjHhzMC9AGtiLRGu65ly0yaYGNVjjZ36Je7BTg/s1600/Java-Collections.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheGbpxNTYfgjrH7egkIy3Q-iWcPQyselU4Q_4_lekBkg1uVx8bB4bvjULM4T0Opz6TcbuXmx4c2IseF38U7BRCeJu0N7WUJ3EbontJ4tjHhzMC9AGtiLRGu65ly0yaYGNVjjZ36Je7BTg/s320/Java-Collections.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the Collections API?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q1&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  Collections API is a set of classes and interfaces that support operations on
  collections of objects&lt;span style=&quot;color: #006600;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the List interface?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q2&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 15.75pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;height: 15.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 15.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  List interface provides support for ordered collections of objects.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the Vector class?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q3&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  Vector class provides the capability to implement a growable array of
  objects.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What
  is an Iterator interface?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q4&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 14.25pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;height: 14.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 14.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  Iterator interface is used to step through the elements of a Collection&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #006600; font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Which java.util classes and
  interfaces support event handling?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q5&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 17.55pt; mso-yfti-irow: 4; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;height: 17.55pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 17.55pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The EventObject class and the
  EventListener interface support event processing.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the GregorianCalendar class?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q6&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 12.0pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;height: 12.0pt; padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;height: 12.0pt; padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  GregorianCalendar provides support for traditional Western calendars&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the Locale class?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q7&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 20.25pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;height: 20.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;height: 20.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  Locale class is used to tailor program output to the conventions of a
  particular geographic, political, or cultural region .&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 107%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 2.78%;&quot; valign=&quot;top&quot; width=&quot;2%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 97.22%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What
  is the SimpleTimeZone class?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q8&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 14.25pt; mso-yfti-irow: 1; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;height: 14.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;height: 14.25pt; padding: 0in 0in 0in 0in; width: 97.22%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  SimpleTimeZone class provides support for a Gregorian calendar .&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What
  is the Map interface?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q10&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 13.5pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;height: 13.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 13.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  Map interface replaces the JDK 1.1 Dictionary class and is used associate
  keys with values.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;&quot; name=&quot;q9&quot;&gt;&lt;/a&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the
  highest-level event class of the event-delegation model?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 13.5pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;height: 13.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 13.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  java.util.EventObject class is the highest-level class in the
  event-delegation class hierarchy.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the Collection interface?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q11&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 25.5pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;height: 25.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 25.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  Collection interface provides support for the implementation of a
  mathematical bag - an unordered collection of objects that may contain
  duplicates.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;&quot; name=&quot;q12&quot;&gt;&lt;/a&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the Set
  interface?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 26.25pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;height: 26.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 26.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  Set interface provides methods for accessing the elements of a finite
  mathematical set. Sets do not allow duplicate elements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the typical use of Hashtable?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q13&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 16.5pt; mso-yfti-irow: 5;&quot;&gt;
  &lt;td style=&quot;height: 16.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 16.5pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Whenever
  a program wants to store a key value pair, one can use Hashtable.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;a href=&quot;&quot; name=&quot;q14&quot;&gt;&lt;/a&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;I am trying to
  store an object using a key in a Hashtable. And some other object already
  exists in that location, then what will happen? The existing object will be
  overwritten? Or the new object will be stored elsewhere?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 14.25pt; mso-yfti-irow: 7;&quot;&gt;
  &lt;td style=&quot;height: 14.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 14.25pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  existing object will be overwritten and thus it will be lost.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is the difference between the
  size and capacity of a Vector?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q15&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr style=&quot;height: 24.0pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;height: 24.0pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 24.0pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The
  size is the number of elements actually stored in the vector, while capacity
  is the maximum number of elements it can store at a given instance of time.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Can a vector contain heterogenous
  objects?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q16&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr style=&quot;height: 36.75pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Yes a Vector can contain heterogenous
  objects. Because a Vector stores everything in terms of Object.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Can
  a ArrayList contain heterogenous objects?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q17&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr style=&quot;height: 36.75pt; mso-yfti-irow: 3;&quot;&gt;
  &lt;td style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Yes a ArrayList can
  contain heterogenous objects. Because a ArrayList stores everything in terms
  of Object.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;What is an enumeration?&lt;/span&gt;&lt;/b&gt;&lt;a href=&quot;&quot; name=&quot;q18&quot;&gt;&lt;/a&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr style=&quot;height: 36.75pt; mso-yfti-irow: 5;&quot;&gt;
  &lt;td style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td colspan=&quot;2&quot; style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;An enumeration is
  an interface containing methods for accessing the underlying data structure
  from which the enumeration is obtained. It is a construct which collection
  classes return when you request a collection of all the objects stored in the
  collection. It allows sequential access to all the elements stored in the
  collection.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
  
  &lt;td style=&quot;padding: 0in 0in 0in 0in;&quot; valign=&quot;bottom&quot;&gt;&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;mso-cellspacing: 0in; mso-padding-alt: 0in 0in 0in 0in; mso-yfti-tbllook: 1184; width: 100%px;&quot;&gt;
 &lt;tbody&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Considering the basic properties of Vector and ArrayList,
  where will you use Vector and where will you use ArrayList?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr style=&quot;height: 36.75pt; mso-yfti-irow: 1;&quot;&gt;
  &lt;td style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;The basic difference between a Vector
  and an ArrayList is that, vector is synchronized while ArrayList is not. Thus
  whenever there is a possibility of multiple threads accessing the same
  instance, one should use Vector. While if not multiple threads are going to
  access the same instance then use ArrayList. Non synchronized data structure
  will give better performance than the synchronized one.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 3.0%;&quot; valign=&quot;top&quot; width=&quot;3%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Q:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;padding: 0in 0in 0in 0in; width: 97.0%;&quot; valign=&quot;top&quot; width=&quot;97%&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Can
  a vector contain heterogenous objects?&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  
 &lt;/tr&gt;
&lt;tr style=&quot;height: 36.75pt; mso-yfti-irow: 3; mso-yfti-lastrow: yes;&quot;&gt;
  &lt;td style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-bidi-font-size: 11.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;A:&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
  &lt;td style=&quot;height: 36.75pt; padding: 0in 0in 0in 0in;&quot; valign=&quot;top&quot;&gt;
  &lt;div class=&quot;MsoNormal&quot; style=&quot;margin-bottom: 0.0001pt;&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10.0pt; mso-bidi-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;Yes
  a Vector can contain heterogenous objects. Because a Vector stores everything
  in terms of Object.&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/8624876727075677629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/collection-related-interview-questions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8624876727075677629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/8624876727075677629'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/collection-related-interview-questions.html' title='COLLECTION RELATED INTERVIEW QUESTIONS.'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheGbpxNTYfgjrH7egkIy3Q-iWcPQyselU4Q_4_lekBkg1uVx8bB4bvjULM4T0Opz6TcbuXmx4c2IseF38U7BRCeJu0N7WUJ3EbontJ4tjHhzMC9AGtiLRGu65ly0yaYGNVjjZ36Je7BTg/s72-c/Java-Collections.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Bhagirathi Vihar, New Delhi, Delhi, India</georss:featurename><georss:point>28.7081001 77.2793059</georss:point><georss:box>28.6941731 77.2595649 28.7220271 77.2990469</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-7640637373332525328</id><published>2012-10-17T00:39:00.000-07:00</published><updated>2012-10-17T00:39:07.700-07:00</updated><title type='text'>Stored Procedure</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;To insert data in database&amp;nbsp;using stored procedure in java.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #0b5394;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;private void CreateuserActionPerformed(&lt;wbr&gt;&lt;/wbr&gt;java.awt.event.ActionEvent evt) { &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO add your handling code here:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String customerName=jTextField12.&lt;wbr&gt;&lt;/wbr&gt;getText();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String contactPerson=jTextField13.&lt;wbr&gt;&lt;/wbr&gt;getText();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String Address=jTextField14.getText()&lt;wbr&gt;&lt;/wbr&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String City=jTextField15.getText();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String phoneNo=jTextField16.getText()&lt;wbr&gt;&lt;/wbr&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String faxNo=jTextField17.getText();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String mobileNo=jTextField18.getText(&lt;wbr&gt;&lt;/wbr&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String emailId=jTextField19.getText()&lt;wbr&gt;&lt;/wbr&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String openingDebitBalance=&lt;wbr&gt;&lt;/wbr&gt;jTextField2.getText();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String openingCreditBalance=&lt;wbr&gt;&lt;/wbr&gt;jTextField20.getText();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; String customerStatus=jTextField21.&lt;wbr&gt;&lt;/wbr&gt;getText();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;// String Saluation = jComboBox2.getSelectedItem().&lt;wbr&gt;&lt;/wbr&gt;toString();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; try {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; Connection conn=DBConnection.&lt;wbr&gt;&lt;/wbr&gt;getDBConnection();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String query = &quot;{call USP_ADD_CUSTOMER(?,?,?,?,?,?,?&lt;wbr&gt;&lt;/wbr&gt;,?,?,?)}&quot;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CallableStatement cs = conn.prepareCall(query);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(1,customerName);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(2, contactPerson);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(3, Address);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(4, City);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(5, phoneNo);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(6, faxNo);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(7, mobileNo);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(8, emailId);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(9, openingDebitBalance);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cs.setString(10, openingCreditBalance);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } catch (Exception e) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; e.printStackTrace();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;e.getMessage().toString();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/7640637373332525328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/stored-procedure.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/7640637373332525328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/7640637373332525328'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/stored-procedure.html' title='Stored Procedure'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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><georss:featurename>Bhagirathi Vihar, New Delhi, Delhi, India</georss:featurename><georss:point>28.7081001 77.2793059</georss:point><georss:box>28.6941731 77.2595649 28.7220271 77.2990469</georss:box></entry><entry><id>tag:blogger.com,1999:blog-7879263817955525601.post-1242868720842346278</id><published>2012-10-16T23:32:00.000-07:00</published><updated>2012-12-18T10:52:02.013-08:00</updated><title type='text'>JDBC CONNECTION</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b&gt;JDBC connection with Mysql&lt;/b&gt;&lt;/span&gt;Most asked question by interviewers...&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4Ci9J5PvjMSWfzpySObbcDhKuFBvl_k9XygdbTdctCGf8_6OmbIUvsgYhQL1Np_UAdgs7BKRdXuQ69BswhshikqXogiXGVFe8wvwwaIHms1Xl_PeILOOrNdjNMSWLh4UY3QwacUIw7Y/s1600/jdbc.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4Ci9J5PvjMSWfzpySObbcDhKuFBvl_k9XygdbTdctCGf8_6OmbIUvsgYhQL1Np_UAdgs7BKRdXuQ69BswhshikqXogiXGVFe8wvwwaIHms1Xl_PeILOOrNdjNMSWLh4UY3QwacUIw7Y/s320/jdbc.jpg&quot; width=&quot;209&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/h4&gt;
&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;import java.sql.*;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public class InsertValues{&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;public static void main(String[] args) &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;System.out.println(&quot;Inserting values in Mysql database table!&quot;);&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Connection con = null;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;String url = &quot;jdbc:mysql://localhost:3306/&quot;&lt;wbr&gt;&lt;/wbr&gt;;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;String db = &quot;jdbctut&quot;;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;String driver = &quot;com.mysql.jdbc.Driver&quot;;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;try{&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;Class.forName(driver);&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;con = DriverManager.getConnection(ur&lt;wbr&gt;&lt;/wbr&gt;l+db,&quot;root&quot;,&quot;root&quot;);&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;try{&amp;nbsp; Statement st = con.createStatement();&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;int val = st.executeUpdate(&quot;INSERT employee VALUES(&quot;+23+&quot;,&quot;+&quot;&#39;Pankaj&#39;&quot;+&quot;)&quot;);&amp;nbsp; System.out.println(&quot;1 row affected&quot;);&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;catch (SQLException s)&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;{&amp;nbsp; System.out.println(&quot;SQL statement is not executed!&quot;);&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&amp;nbsp; catch (Exception e){&amp;nbsp; e.printStackTrace();&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;}&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h2&gt;
&lt;/h2&gt;
</content><link rel='replies' type='application/atom+xml' href='http://javasolutions4all.blogspot.com/feeds/1242868720842346278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/jdbc-connection.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1242868720842346278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7879263817955525601/posts/default/1242868720842346278'/><link rel='alternate' type='text/html' href='http://javasolutions4all.blogspot.com/2012/10/jdbc-connection.html' title='JDBC CONNECTION'/><author><name>pankaj bhardwaj</name><uri>http://www.blogger.com/profile/12818512748742982502</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><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhF4Ci9J5PvjMSWfzpySObbcDhKuFBvl_k9XygdbTdctCGf8_6OmbIUvsgYhQL1Np_UAdgs7BKRdXuQ69BswhshikqXogiXGVFe8wvwwaIHms1Xl_PeILOOrNdjNMSWLh4UY3QwacUIw7Y/s72-c/jdbc.jpg" height="72" width="72"/><thr:total>2</thr:total><georss:featurename>Deen Dayal Upadhaya Marg, Connaught Place, New Delhi, Delhi, India</georss:featurename><georss:point>28.635308 77.22496</georss:point><georss:box>28.189362499999998 76.593246 29.0812535 77.856674</georss:box></entry></feed>