tag:blogger.com,1999:blog-33431227906784697632024-03-19T22:44:43.354-07:00Servlets Encyclopediaservlets Encyclopedia which helps U to explore u knowledge in servlets and to maintain MVC architechture in UR project work .Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-3343122790678469763.post-66644103192799699902013-02-04T07:58:00.000-08:002013-02-04T08:08:26.422-08:00Session Bean | Entity Bean | War files | ear Files | Jar files<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}
</style>
<![endif]-->
<br />
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;"> Session Bean | Entity Bean | War Files vs Ear Files Vs Ear Files</span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;">Session Bean:
Session is one of the EJBs and it represents a single client inside the
Application Server. Stateless session is easy to develop and its efficient. As
compare to entity beans session beans require few server resources.</span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;">A session bean
is similar to an interactive session and is not shared; it can have only one
client, in the same way that an interactive session can have only one user. A
session bean is not persistent and it is destroyed once the session terminates.</span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;">Entity Bean: An
entity bean represents persistent global data from the database. Entity beans
data are stored into database. </span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;">Difference
between war rar and ear files?</span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;"><span style="mso-spacerun: yes;"> </span>Answer: These files are simply zipped file
using java jar tool. These files are created for different purposes. Here is
the description of these files:</span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;">.jar files:
These files are with the .jar extenstion. The .jar files contains the
libraries, resources and accessories files like property files.</span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;">.war files: These
files are with the .war extension. The war file contains the web application
that can be deployed on the any servlet/jsp container. The .war file contains
jsp, html, javascript and other files for necessary for the development of web
applications.</span></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 115%; margin-bottom: 10.0pt;">
<span lang="EN" style="font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN;">.ear files: The
.ear file contains the EJB modules of the application. </span></div>
Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.com0tag:blogger.com,1999:blog-3343122790678469763.post-44287650103521496902013-01-27T02:21:00.002-08:002013-01-27T02:21:38.703-08:00Servlets Interview Questions - 2 <br />
6. What is the life cycle of a servlet?<br />
init()–used for initialization<br />
service()–for processing client requests<br />
destroy()– used for closing<br />
<br />
7. What is meant by cookies? Why is Cookie used?<br />
<br />
8. What is HTTP Session?<br />
<br />
9. What is the difference between GET and POST methods?<br />
<br />
Using GET method, we can able to pass 2K data from HTML.<br />
In POST method, we do not have any size limitation.<br />
<br />
10. How can you run a Servlet Program?<br />
<br />
11. What is the middleware? What is the functionality of Webserver?<br />
<br />
12. What webserver is used for running the Servlets?<br />
<br />
13. How do you invoke a Servelt? What is the difference in between doPost and doGet<br />
methods?<br />
<br />
14. What is the difference in between the HTTPServlet and Generic Servlet? Explain their<br />
methods? Tell me their parameter names also?<br />
<br />
15. What are session variable in Servlets?<br />
<br />
16. What is meant by Session? Tell me something about HTTPSession Class?<br />
<br />
17. What is Session Tracking?<br />
<br />
18. Difference between doGet and doPost?<br />
<br />
When we make a request to any servlet, request doesn’t goes directly to the servlet<br />
instead it will go to the service method of the super class and then it is passed as a<br />
parameters to the service method of your class. In doGet() method the data will append to<br />
the url as a query string and we can’t send huge amount of data using doGET() method.<br />
Where as in doPost() method the data can be directly sent to browser without displaying<br />
it in the url. With this we can send as much of data as we can. But doGet() method is little<br />
faster when compared to doPost().but it is not recommended as for some sensitive<br />
messages like password will be displayed as a query string in it.<br />
<br />
19. What are the methods in HttpServlet?<br />
<br />
doGet()<br />
doPost()<br />
doHead()<br />
doPut()<br />
doOptions()<br />
doDelete()<br />
doTrace().<br />
Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.com0tag:blogger.com,1999:blog-3343122790678469763.post-38678159704822007172013-01-27T02:13:00.003-08:002013-01-27T02:13:44.586-08:00 Servlets Interview Questions -1<br />
<b> Servlets Interview Questions -1</b><br />
<b><br /></b>
<b>1. What is the difference between CGI and Servlet?</b><br />
<br />
Advantages of servlets over CGI are:-<br />
· Servlets are multithreaded which can support multiple users’ requests. i.e., servlet is a<br />
resource and where as requests are treated as threads. So multiple requests (threads) can<br />
access a single instance of servlet resource asynchronously. Whereas CGI provide a new<br />
instance for every request, it is a single thread model .By creating new instance every<br />
request server won’t support multiple requests.<br />
· Servlets are used to generate dynamic content.<br />
· Servlets are platform independent.<br />
· Servlets are more efficient compare to other server side programming.<br />
<br />
<b>2. What is meant by a servlet?</b><br />
<br />
Servlet is a server side component written in java, which can host request of client,<br />
process the request and response sent back to the client.<br />
Servlet is a java program that is run inside a servlet engine called web server. It take<br />
requests from client and responds to those requests.<br />
<br />
<b>3. What are the types of servlets? What is the difference between 2 types of Servlets?</b><br />
<br />
There are two types of servlets provided by servlet API those are<br />
1) GenericServlet- It can use for any type of protocols (http, ftp, telnet)<br />
It is protocol independent ,it support service() method only<br />
2) HttpServlet- It can use for only http protocol, it support doGet() and doPost() methods<br />
with Service() methods<br />
<br />
<b>4. What is the type of method for sending request from HTTP server?</b><br />
<br />
Http server request can sent in two types one is GET and second one is POST<br />
<br />
<b>5. What are the exceptions thrown by Servlets? Why?</b><br />
<br />
Exceptions thrown by servlet are:<br />
ServletException<br />
IOException<br />
Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.com0tag:blogger.com,1999:blog-3343122790678469763.post-68166504618480814852013-01-19T20:30:00.001-08:002013-01-19T20:30:12.168-08:00Java Interview Questions<span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px; margin-top: 0px;"><b>Question 1</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code? (Assume that the code is compiled and run with assertions enabled.)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class AssertTest</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void methodA(int i)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">assert i >= 0 : methodB();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void methodB()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("The value must not be negative");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">AssertTest test = new AssertTest();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">test.methodA(-10);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will print -10</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will result in Assertion Error showing the message -"The value must not be negative".</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will not compile.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 2:-</b></span><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class Static</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">static</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int x = 5;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">static int x,y;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">x--; myMethod();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(x + y + ++x);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void myMethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">y = x++ + ++x;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compile time error prints : 1</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">prints : 2 prints : 3</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">prints : 7 prints : 8</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 3</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Given the following code, what will be the output?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Value</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public int i = 15;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class Test</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String argv[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Test t = new Test();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">t.first();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void first()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int i = 5;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Value v = new Value();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">v.i = 25;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">second(v, i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(v.i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void second(Value v, int i)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">i = 0;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">v.i = 20;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Value val = new Value();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">v = val;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(v.i + " " + i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">15 0 20 0</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">15 0 15</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">20 20</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 4</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class MyParent</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int x, y;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyParent(int x, int y)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">this.x = x;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">this.y = y;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public int addMe(int x, int y)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">return this.x + x + y + this.y;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public int addMe(MyParent myPar)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">return addMe(myPar.x, myPar.y);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class MyChild extends MyParent</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">in z;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyChild (int x, int y, int z)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">super(x,y);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">this.z = z;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public int addMe(int x, int y, int z)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">return this.x + x + this.y + y + this.z + z;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public int addMe(MyChild myChi)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">return addMe(myChi.x, myChi.y, myChi.z);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public int addMe(int x, int y)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">return this.x + x + this.y + y;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class MySomeOne</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyChild myChi = new MyChild(10, 20, 30);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyParent myPar = new MyParent(10, 20);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int x = myChi.addMe(10, 20, 30);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int y = myChi.addMe(myChi);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int z = myPar.addMe(myPar);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(x + y + z);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">300 240</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">120 180</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation Error None of the above</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 5</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The class AssertionError has "is - a" relationship with these classes:</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">RuntimeException</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">VirtualMachineError</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">IllegalAccessException</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Throwable</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><b style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><span style="color: red;">Question 6</span></b><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will be the result of executing the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">1. boolean a = true;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">2. boolean b = false;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">3. boolean c = true;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">4. if (a == true)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">5. if (b == true)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">6. if (c == true) System.out.println("Some things are true in this world");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">7. else System.out.println("Nothing is true in this world!");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">8. else if (a && (b = c)) System.out.println("It's too confusing to tell what is true and what is false");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">9. else System.out.println("Hey this won't compile");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code won't compile</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">"Some things are true in this world" will be printed</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">"Hey this won't compile" will be printed</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 7</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">interface MyInterface</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class MyInstanceTest implements MyInterface</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">static String s;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyInstanceTest t = new MyInstanceTest();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">if(t instanceof MyInterface)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("I am true interface");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">else</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("I am false interface");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">if(s instanceof String)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("I am true String");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">else</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("I am false String");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compile time error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Runtime error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : "I am true interface" followed by " I am true String"</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : "I am false interface" followed by " I am false String"</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : "I am true interface" followed by " I am false String"</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : "I am false interface" followed by " I am true String"</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 8</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What results from attempting to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class Ternary</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int a = 5;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Value is - " + ((a < 5) ? 9.9 : 9));</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints: Value is - 9</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints: Value is - 5</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 9</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">In the following pieces of code, A and D will compile without any error. True/False?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">A: StringBuffer sb1 = "abcd";</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">B: Boolean b = new Boolean("abcd");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">C: byte b = 255;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">D: int x = 0x1234;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">E: float fl = 1.2;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 10</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Considering the following code, which variables may be referenced correctly at line 12?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class Outer</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public int a = 1;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">private int b = 2;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void method(final int c)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int d = 3;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Inner</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">private void iMethod(int e)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">a b</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">c d</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">e</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 11</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will be the result of executing the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">char digit = 'a';</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">for (int i = 0; i < 10; i++)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">switch (digit)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">case 'x' :</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int j = 0;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(j);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">default :</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int j = 100;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(j);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int i = j;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">100 will be printed 11 times. 100 will be printed 10 times and then there will be a runtime exception.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will not compile because the variable i cannot be declared twice within the main() method. The code will not compile because the variable j cannot be declared twice within the switch statement.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 12</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Which of the following collection classes from java.util package are Thread safe?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Vector ArrayList</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">HashMap Hashtable</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 13</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class MyThread extends Thread</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void run()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("MyThread: run()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void start()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("MyThread: start()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class MyRunnable implements Runnable</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void run()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("MyRunnable: run()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void start()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("MyRunnable: start()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class MyTest</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyThread myThread = new MyThread();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyRunnable myRunnable = new MyRunnable();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Thread thread = new Thread(myRunnable);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">myThread.start();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">thread.start();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : MyThread: start() followed by MyRunnable:run() Prints : MyThread: run() followed by MyRunnable:start()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : MyThread: start() followed by MyRunnable:start() Prints : MyThread: run() followed by MyRunnable:run()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compile time error None of the above</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 14</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will be the result of executing the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">// Filename; SuperclassX.java</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">package packageX;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class SuperclassX</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">protected void superclassMethodX()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int superclassVarX;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">// Filename SubclassY.java</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">1. package packageX.packageY;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">2.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">3. public class SubclassY extends SuperclassX</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">4. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">5. SuperclassX objX = new SubclassY();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">6. SubclassY objY = new SubclassY();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">7. void subclassMethodY()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">8. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">9. objY.superclassMethodX();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">10. int i;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">11. i = objY.superclassVarX;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">12. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">13. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation error at line 5 Compilation error at line 9</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Runtime exception at line 11 None of these</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 15</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Consider the class hierarchy shown below: --------------------------------------------------------------------</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class FourWheeler implements DrivingUtilities</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Car extends FourWheeler</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Truck extends FourWheeler</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Bus extends FourWheeler</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Crane extends FourWheeler</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">----------------------------------------------------------------------</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Consider the following code below:</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">1. DrivingUtilities du;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">2. FourWheeler fw;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">3. Truck myTruck = new Truck();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">4. du = (DrivingUtilities)myTruck;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">5. fw = new Crane();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">6. fw = du;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Which of the statements below are true?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Line 4 will not compile because an interface cannot refer to an object. The code will compile and run.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will not compile without an explicit cast at line 6, because going down the hierarchy without casting is not allowed. The code at line 4 will compile even without the explicit cast.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will compile if we put an explicit cast at line 6 but will throw an exception at runtime.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 16</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What results from the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">1. class MyClass</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">2. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">3. void myMethod(int i) {System.out.println("int version");}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">4. void myMethod(String s) {System.out.println("String version");}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">5. public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">6. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">7. MyClass obj = new MyClass();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">8. char ch = 'c';</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">9. obj.myMethod(ch);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">10. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">11. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Line 4 will not compile as void methods can't be overridden.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">An exception at line 9</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Line 9 will not compile as there is no version of myMethod, which takes a char as argument.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code compiles and produces output: int version.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code compiles and produces output: String version</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 17</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What is the result when you compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class ThrowsDemo</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">static void throwMethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Inside throwMethod.");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">throw new IllegalAccessException("demo");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">try</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">throwMethod();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">catch (IllegalAccessException e)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Caught " + e);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation error Runtime error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compile successfully, nothing is printed. Inside throwMethod. followed by caught: java.lang.IllegalAccessExcption: demo</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 18</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will be printed when you execute the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class X</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Y b = new Y();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">X()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.print("X");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Y</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Y()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.print("Y");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class Z extends X</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Y y = new Y();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Z()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.print("Z");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String[] args)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">new Z();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Z</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">YZ</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">XYZ</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">YXYZ</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 19</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code snippet?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Boolean b = new Boolean("TRUE");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">if(b.booleanValue())</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Yes : " + b);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">else</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("No : " + b);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will not compile.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will print - Yes : true</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will print - Yes : TRUE</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will print - No : false</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will print - No : FALSE</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 20</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What is the result when you compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class Test</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void method()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">for(int i = 0; i < 3; i++)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.print(i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.print(i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">0122</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">0123</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 21</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int Output = 10;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">boolean b1 = false;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">if((b1 == true) && ((Output += 10) == 20))</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("We are equal " + Output);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">else</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Not equal! " + Output);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation error, attempting to perform binary comparison on logical data type.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation and output of "We are equal 10".</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation and output of "Not equal! 20".</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation and output of "Not equal! 10".</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 22</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will be the result of executing the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Given that Test1 is a class.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">1. Test1[] t1 = new Test1[10];</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">2. Test1[][] t2 = new Test1[5][];</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">3. if (t1[0] == null)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">4. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">5. t2[0] = new Test1[10]</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">6. t2[1] = new Test1[10]</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">7. t2[2] = new Test1[10]</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">8. t2[3] = new Test1[10]</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">9. t2[4] = new Test1[10]</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">10. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">11. System.out.println(t1[0]);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">12. System.out.println(t2[1][0]);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will not compile because the array t2 is not initialized in an unconditional statement before use.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will compile but a runtime exception will be thrown at line 12.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will compile but a runtime exception will be thrown at line 11.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 23</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Base</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int i = 99;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void amethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Base.amethod()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Base()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">amethod();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class Derived extends Base</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int i = -1;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String argv[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Base b = new Derived();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(b.i);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">b.amethod();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void amethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Derived.amethod()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Derived.amethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">-1</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Derived.amethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Derived.amethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">99</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Derived.amethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">99</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Derived.amethod()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compile time error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">@</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 24</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will be the output on compiling/running the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class MyThread implements Runnable</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">String myString = "Yes ";</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void run()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">this.myString = "No ";</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String[] args)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyThread t = new MyThread();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">new Thread(t).start();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">for (int i=0; i < 10; i++)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.print(t.myString);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compilation Error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes and so on.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : No No No No No No No No No No and so on.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Prints : Yes No Yes No Yes No Yes No Yes No and so on.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The Output cannot be determined</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 25</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Multiple objects of MyClass (given below) are used in a program that uses multiple Threads to create new integer count. What will happen when other threads use the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class MyClass</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">static private int myCount = 0;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">int yourNumber;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">private static synchronized int nextCount()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">return ++myCount;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void getYourNumber()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">yourNumber = nextCount();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will give compilation error.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code will give runtime error.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Each thread will get a unique number.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The uniqueness of the number among different Threads can't be guaranteed.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 26</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Which of the following lines will print false?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">1. public class MyClass</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">2. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">3. static String s1 = "I am unique!";</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">4. public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">5. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">6. String s2 = "I am unique!";</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">7. String s3 = new String(s1);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">8. System.out.println(s1 == s2);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">9. System.out.println(s1.equals(s2));</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">10. System.out.println(s3 == s1);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">11. System.out.println(s3.equals(s1));</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">12. System.out.println(TestClass.s4 == s1);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">13. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">14. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">15.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">16. class TestClass</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">17. {</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">18. static String s4 = "I am unique!";</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">19. }</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Lines 10 and 12</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Line 12 only</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Lines 8 and 10</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 27</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What is displayed when the following code is compiled and executed?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">String s1 = new String("Test");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">String s2 = new String("Test");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">if (s1==s2)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Same");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">if (s1.equals(s2))</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Equals");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Same</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Equals</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code compiles, but nothing is displayed upon execution.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The code fails to compile.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 28</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What is displayed when the following is executed?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Parent</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">private void method1()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Parent's method1()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void method2()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Parent's method2()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">method1();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">class Child extends Parent</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void method1()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Child's method1()");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Parent p = new Child();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">p.method2();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compile time error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Run time error</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">prints : Parent's method2()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Parent's method1()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">prints : Parent's method2()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Child's method1()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 29</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code snippet?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">String str = "Java";</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">StringBuffer buffer = new StringBuffer(str);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">if(str.equals(buffer))</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Both are equal");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">else</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println("Both are not equal");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will print - Both are not equal</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">It will print - Both are equal</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Compile time error as you can not use equals for objects of different classes</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">Runtime error as you can not use equals for objects of different classes</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">None of these</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: red; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;"><b>Question 30</b></span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">What will happen when you attempt to compile and run the following code?</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public class MyThread extends Thread</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">String myName;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyThread(String name)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">myName = name;</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public void run()</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">for(int i=0; i<100;i++)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">System.out.println(myName);</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">public static void main(String args[])</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">try</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyThread mt1 = new MyThread("mt1");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">MyThread mt2 = new MyThread("mt2");</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">mt1.start();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">// XXX</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">mt2.start();</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">catch(InterruptedException ex)</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">{</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">}</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">The above code in its current condition will not compile.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">In order to make the MyThread class prints "mt1" (100 times) followed by "mt2" (100 times), mt1.join(); can be placed at //XXX position.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">In order to make the MyThread class prints "mt1" (100 times) followed by "mt2" (100 times), mt1.sleep(100); can be placed at //XXX position.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">In order to make the MyThread class prints "mt1" (100 times) followed by "mt2" (100 times), mt1.run(); can be placed at //XXX position.</span><br style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;" /><span style="background-color: #fcfcff; color: #141414; font-family: Georgia, 'Times New Roman', Times, serif; font-size: 15px; line-height: 20px;">In order to make the MyThread class prints "mt1" (100 times) followed by "mt2" (100 times), there is no need to write any code.</span>Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.com0tag:blogger.com,1999:blog-3343122790678469763.post-27119631079369256402013-01-13T09:36:00.001-08:002013-01-13T09:36:19.704-08:00 Steps to create a simple servlet The article assumes, you have JDK 5.0/6.0 and Tomcat 6.0.<br />
<br />
The following are the steps to be taken by you to create a simple servlet.<br />
<br />
<b>Download Tomcat 6.0 from <a class="externalLink" href="http://tomcat.apache.org/" target="_blank">http://tomcat.apache.org</a></b><br />
<b>Install Tomcat 6.0 into c:\ApacheTomcat6.0</b><br />
<b>Go to webapps directory of Tomcat and create the following directory
structure for demo application. Any directory placed with required
structure of Java EE web application is treated as a web application by
Tomcat.</b><br />
<b> demo</b><br />
<b> WEB-INF</b><br />
<b> classes</b><br />
<b> TestServlet.java</b><br />
<b> web.xml</b><br />
<br />
Creating Servlet Source Code<br />
<br />
The following is the code for TestServlet.java. It simply sends a message to browser.<br />
<br />
<b>import java.io.*;</b><br />
<b>import javax.servlet.*;</b><br />
<b>import javax.servlet.http.*;</b><br />
<br />
<b>public class TestServlet extends HttpServlet {</b><br />
<b> public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {</b><br />
<b> response.setContentType("text/html");</b><br />
<b> PrintWriter out = response.getWriter();</b><br />
<b> out.println("<html><body><h1>Test Servlet </h1></body></html>");</b><br />
<b> }</b><br />
<br />
<b> public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {</b><br />
<b> doGet(request, response);</b><br />
<b> }</b><br />
<b>}</b><br />
<br />
<br />
<br />
Create web.xml as follows. It is better you copy web.xml from some other
application in Tomcat webapps directory instead of typing it from
scratch. Make sure it is placed in WEB-INF (in uppercase) folder of demo
application with the following content.<br />
<br />
<b><?xml version="1.0" encoding="ISO-8859-1"?></b><br />
<b><web-app xmlns="<a class="externalLink" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a>"</b><br />
<b> xmlns:xsi="<a class="externalLink" href="http://www.w3.org/2001/XMLSchema-instance" target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>"</b><br />
<b> xsi:schemaLocation="<a class="externalLink" href="http://java.sun.com/xml/ns/javaee" target="_blank">http://java.sun.com/xml/ns/javaee</a> <a class="externalLink" href="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" target="_blank">http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd</a>"</b><br />
<b> version="2.5"> </b><br />
<b> <servlet></b><br />
<b> <servlet-name>TestServlet</servlet-name></b><br />
<b> <servlet-class>TestServlet</servlet-class></b><br />
<b> </servlet></b><br />
<b> <servlet-mapping></b><br />
<b> <servlet-name>TestServlet</servlet-name></b><br />
<b> <url-pattern>/test</url-pattern></b><br />
<b> </servlet-mapping></b><br />
<br />
<b></web-app></b><br />
<br />
TestServlet is associated with url pattern /test in web.xml. From the client, we have to make request for url pattern /test.<br />
Compiling Servlet<br />
<br />
Go to classes directory, where .java file is placed as enter the
following commands at the command prompt to compile the servlet.<br />
<b>path=d:\jdk1.6.0\bin</b><br />
<b>set classpath=.;c:\apachetomcat6.0\lib\servlet-api.jar</b><br />
<b>javac TestServlet.java</b><br />
<br />
Make sure you change JDK and Tomcat directories according to your installation.<br />
<br />
Set path to the directory where JDK is installed. Servlet-api.jar
contains API related to servlet like HttpServlet, HttpServletRequest
etc., so it must be placed in the classpath. Compile the servlet (.java)
to create .class file.<br />
<br />
Starting Tomcat and Running Servlet<br />
<br />
<b>Start Tomcat by taking the follwing steps from BIN directory of Tomcat.</b><br />
<b>set java_home=d:\jdk1.6.0</b><br />
<b>startup </b><br />
<br />
Once, tomcat is successfully started, go to browser and enterer the following URL.<br />
<a class="externalLink" href="http://localhost:8080/demo/test" target="_blank">http://localhost:8080/demo/test</a><br />
You must see the output as follows.<br />
<br />
<img alt="[IMG]" class="bbCodeImage LbImage" src="http://i1250.photobucket.com/albums/hh530/JavaEraDotCom/testservlet.jpg" />Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.com0tag:blogger.com,1999:blog-3343122790678469763.post-23895682282026234712013-01-13T00:48:00.004-08:002013-01-13T00:48:42.238-08:00Servlet QUIZ Questions -1<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><br />
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;}
</style>
<![endif]-->
<br />
<ol start="1" type="1"><ol start="1" type="1">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Which of the following are interfaces? (3 correct
answers) </span></li>
<ol start="1" type="a">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Servlet</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">ServletRequest</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServletRequest</span></li>
</ol>
</ol>
</ol>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">ANS :
a,c,d</span></div>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<br /></div>
<ol start="1" type="1"><ol start="2" type="1">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Which of the following are abstract classes? (2
correct answers) </span></li>
<ol start="1" type="a">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Servlet</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">GenericServlet</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServletRequest</span></li>
</ol>
</ol>
</ol>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">ANS: b,c</span></div>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<br /></div>
<ol start="1" type="1"><ol start="3" type="1">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Which of the following statements is true? (1 correct
answer) </span></li>
<ol start="1" type="a">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet extends
GenericServlet that implements Servlet.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet extends
GenericServlet that extends Servlet.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet implements
GenericServlet that extends Servlet.<span style="mso-spacerun: yes;">
</span></span></li>
</ol>
</ol>
</ol>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">ANSWER : a</span></div>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<br /></div>
<ol start="1" type="1"><ol start="4" type="1">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Which of the following statements are true? (2 correct
answers) </span></li>
<ol start="1" type="a">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet IS-A
GenericServlet.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet IS-A Servlet.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">HttpServlet IS-A
ServletRequest.</span></li>
</ol>
</ol>
</ol>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Answer :
a,b</span></div>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.0in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<br /></div>
<ol start="1" type="1"><ol start="5" type="1">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level2 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.0in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Here are some actions taken by the Container when a
client request arrives. Place them in the correct order starting from
what happens <i>first</i>. </span></li>
<ol start="1" type="a">
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Calls the void
service(HttpServletRequest, HttpServletResponse) method of the servlet.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Creates a pair of request and
response objects.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Finds the correct servlet
based on the URL.</span></li>
<li class="MsoNormal" style="line-height: normal; mso-list: l0 level3 lfo1; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto; tab-stops: list 1.5in;"><span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Creates a new thread or
allocates an existing thread to the client’s request.</span></li>
</ol>
</ol>
</ol>
<div class="MsoNormal" style="line-height: normal; margin-left: 1.5in; mso-margin-bottom-alt: auto; mso-margin-top-alt: auto;">
<span style="font-family: "Times New Roman","serif"; font-size: 12.0pt; mso-fareast-font-family: "Times New Roman";">Answer :
b,c,d,a</span></div>
Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.com0tag:blogger.com,1999:blog-3343122790678469763.post-49900656213278963842012-11-06T22:10:00.001-08:002012-11-06T22:44:50.713-08:00Java Clone, Shallow Copy and Deep Copy<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.blogger.com/blogger.g?blogID=3343122790678469763" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<br />
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPcmLoPXXYtzE0JamtBgijYsZjIsXRsw-m5pn-1rh5Wn2ejpKjITEAvcduDWTxWhtKWIVR-S4PLcPTRO2XuKMXqi_6jWw7QX56I_NUcDWGJVrgi5MPxXpz9LKALvnnRICJIdlQgmmI6dA/s1600/The-Importance-of-Education-and-Training-in-PR.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPcmLoPXXYtzE0JamtBgijYsZjIsXRsw-m5pn-1rh5Wn2ejpKjITEAvcduDWTxWhtKWIVR-S4PLcPTRO2XuKMXqi_6jWw7QX56I_NUcDWGJVrgi5MPxXpz9LKALvnnRICJIdlQgmmI6dA/s1600/The-Importance-of-Education-and-Training-in-PR.jpg" width="199" /></a></div>
Clone (κλών) is a Greek word meaning “branch”, referring to the process whereby a new plant can be created from a twig. In biology it is about copying the DNAs. In real world, if you clone Marilyn Monroe, will you get a copy of her with same beauty and characteristics? No, you will not get! This exactly applies to java also. See how java guys are good at naming technologies.</div>
<div class="wp-caption alignright" style="border: 1px solid rgb(180, 225, 250); float: right; font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
In java, though clone is ‘intended’ to produce a copy of the same object it is not guaranteed. Clone comes with lots of its and buts. So my first advice is to not depend on clones. If you want to provide a handle / method to deliver a copy of the current instance write a kind of <a href="http://javapapers.com/design-patterns/factory-method-pattern/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Factory Method Pattern">factory method</a>and provide it with a good documentation. When you are in a situation to use a third party component and produce copies of it using the clone method, then investigate that implementation carefully and get to know what is underlying. Because when you ask for a rabbit, it may give monkeys!</div>
<h2 style="color: #223344; font-family: 'Trebuchet MS', Helvetica, sans-serif; line-height: 22px;">
Shallow Copy</h2>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
Generally clone method of an object, creates a new instance of the same class and copies all the fields to the new instance and returns it. This is nothing but shallow copy. Object class provides a clone method and provides support for the shallow copy. It returns ‘Object’ as type and you need to explicitly cast back to your original object.</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
Since the Object class has the clone method (<a href="http://javapapers.com/core-java/access-modifiers-in-java-explain/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Access Modifiers In Java">protected</a>) you cannot use it in all your classes. The class which you want to be cloned should implement clone method and<a href="http://javapapers.com/core-java/overloading-and-overriding/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Overloading vs Overriding">overwrite </a>it. It should provide its own meaning for copy or to the least it should invoke the super.clone(). Also you have to implement Cloneable <a href="http://javapapers.com/core-java/abstract-and-interface-core-java-2/what-is-a-java-marker-interface/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Marker Interface">marker interface</a> or else you will get CloneNotSupportedException. When you invoke the super.clone() then you are dependent on the Object class’s implementation and what you get is a shallow copy.</div>
<h2 style="color: #223344; font-family: 'Trebuchet MS', Helvetica, sans-serif; line-height: 22px;">
Deep Copy</h2>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
When you need a deep copy then you need to implement it yourself. When the copied object contains some other object its references are copied recursively in deep copy. When you implement deep copy be careful as you might fall for cyclic dependencies. If you don’t want to implement deep copy yourselves then you can go for <a href="http://javapapers.com/core-java/java-serialization/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Java Serialization">serialization</a>. It does implements deep copy implicitly and gracefully handling cyclic dependencies.</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
One more disadvantage with this clone system is that, most of the <a href="http://javapapers.com/core-java/abstract-and-interface-core-java-2/difference-between-a-java-interface-and-a-java-abstract-class/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Difference Between Interface and Abstract Class">interface / abstract</a> class writers in java forget to put a public clone method. For example you can take List. So when you want to clone their implementations you have to ignore the abstract type and use actual implementations like ArrayList by name. This completely removes the advantage and goodness of abstractness.</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
When implementing a <a href="http://javapapers.com/design-patterns/singleton-pattern/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Singleton Pattern">singleton pattern</a>, if its superclass implements a public clone() method, to prevent your subclass from using this class’s clone() method to obtain a copy overwrite it and throw an <a href="http://javapapers.com/core-java/java-exception/explain-type-of-exceptions-or-checked-vs-unchecked-exceptions-in-java/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Checked vs Unchecked Exceptions">exception</a> of type CloneNotSupportedException.</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
Note that clone is not for instantiation and initialization. It should not be synonymously used as creating a new object. Because the constructor of the cloned objects may never get invoked in the process. It is about copying the object in discussion and not creating new. It completely depends on the clone implementation. One more disadvantage (what to do there are so many), clone prevents the use of <a href="http://javapapers.com/core-java/explain-the-final-keyword-in-java/" style="background-color: #f1f991; color: #4a6b82; cursor: pointer; text-decoration: none;" title="Java Final Keyword">final</a> fields. We have to find roundabout ways to copy the final fields into the copied object.</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
Clone is an agreement between you, compiler and implementer. If you are confident that you all three have good knowledge of java, then go ahead and use clone. If you have a slightest of doubt better copy the object manually.<br />
<br />
<br />
<h1 class="title entry-title" itemprop="name" style="background-color: white; color: #333333; display: table-cell; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 20px; font-weight: normal; line-height: normal; margin: 0px; padding: 0px 40px 0px 0px; position: relative; text-align: center; vertical-align: middle; width: 710px;">
<a href="http://myjavaquestionbank.blogspot.in/" rel="nofollow" target="_blank">IP address of localhost from Java Program</a></h1>
</div>
<h2 style="color: #223344; font-family: 'Trebuchet MS', Helvetica, sans-serif; line-height: 22px;">
Example source code for java clone and shallow copy</h2>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
<div class="syntaxhighlighter nogutter java" id="highlighter_122747" style="background-color: rgb(27, 36, 38) !important; background-image: url(http://javapapers.com/wp-content/themes/papers/images/code.jpg); background-position: initial initial; background-repeat: repeat repeat; font-size: 1em !important; margin: 1em 0px !important; overflow-x: auto !important; overflow-y: hidden !important; position: relative !important; width: 409px;">
<table border="0" cellpadding="0" cellspacing="0" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: 468px;"><tbody style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="code" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 468px;"><div class="container" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<div class="line number1 index0 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">class</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Employee </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">implements</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Cloneable {</code></div>
<div class="line number2 index1 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
</div>
<div class="line number3 index2 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">private</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">String name;</code></div>
<div class="line number4 index3 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">private</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">String designation;</code></div>
<div class="line number5 index4 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
</div>
<div class="line number6 index5 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Employee() {</code></div>
<div class="line number7 index6 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">this</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">.setDesignation(</code><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(92, 230, 56) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"Programmer"</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">);</code></div>
<div class="line number8 index7 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number9 index8 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">String getDesignation() {</code></div>
<div class="line number10 index9 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">return</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">designation;</code></div>
<div class="line number11 index10 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number12 index11 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
</div>
<div class="line number13 index12 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">void</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">setDesignation(String designation) {</code></div>
<div class="line number14 index13 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">this</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">.designation = designation;</code></div>
<div class="line number15 index14 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number16 index15 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
</div>
<div class="line number17 index16 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">String getName() {</code></div>
<div class="line number18 index17 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">return</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">name;</code></div>
<div class="line number19 index18 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number20 index19 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
</div>
<div class="line number21 index20 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">void</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">setName(String name) {</code></div>
<div class="line number22 index21 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">this</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">.name = name;</code></div>
<div class="line number23 index22 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number24 index23 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
</div>
<div class="line number25 index24 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Object clone() </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">throws</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">CloneNotSupportedException {</code></div>
<div class="line number26 index25 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(135, 138, 133) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">/*</code></div>
<div class="line number27 index26 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(135, 138, 133) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Employee copyObj = new Employee();</code></div>
<div class="line number28 index27 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(135, 138, 133) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">copyObj.setDesignation(this.designation);</code></div>
<div class="line number29 index28 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(135, 138, 133) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">copyObj.setName(this.name);</code></div>
<div class="line number30 index29 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(135, 138, 133) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">return copyObj;</code></div>
<div class="line number31 index30 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java comments" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(135, 138, 133) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">*/</code></div>
<div class="line number32 index31 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">return</code> <code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">super</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">.clone();</code></div>
<div class="line number33 index32 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number34 index33 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number35 index34 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
</div>
<div class="line number36 index35 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">class</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">CloneExample {</code></div>
<div class="line number37 index36 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">public</code> <code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">static</code> <code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">void</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">main(String arg[]){</code></div>
<div class="line number38 index37 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Employee jwz = </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">new</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Employee();</code></div>
<div class="line number39 index38 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">jwz.setName(</code><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(92, 230, 56) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"Jamie Zawinski"</code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">);</code></div>
<div class="line number40 index39 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">try</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">{</code></div>
<div class="line number41 index40 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Employee joel = (Employee) jwz.clone();</code></div>
<div class="line number42 index41 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">System.out.println(joel.getName());</code></div>
<div class="line number43 index42 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">System.out.println(joel.getDesignation());</code></div>
<div class="line number44 index43 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">} </code><code class="java keyword" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(91, 161, 207) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">catch</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">(CloneNotSupportedException cnse) {</code></div>
<div class="line number45 index44 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">System.out.println(</code><code class="java string" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(92, 230, 56) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"Cloneable should be implemented. "</code> <code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">+ cnse );</code></div>
<div class="line number46 index45 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number47 index46 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java spaces" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
<div class="line number48 index47 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="java plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
Output of the above program:</div>
<div style="font-family: verdana, 'bitstream vera sans', sans-serif; font-size: 13px; line-height: 21px;">
<div class="syntaxhighlighter nogutter plain" id="highlighter_401136" style="background-color: rgb(27, 36, 38) !important; background-image: url(http://javapapers.com/wp-content/themes/papers/images/code.jpg); background-position: initial initial; background-repeat: repeat repeat; font-size: 1em !important; margin: 1em 0px !important; overflow-x: auto !important; overflow-y: hidden !important; position: relative !important; width: 409px;">
<table border="0" cellpadding="0" cellspacing="0" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: 409px;"><tbody style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="code" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 409px;"><div class="container" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<div class="line number1 index0 alt2" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="plain plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Jamie Zawinski</code></div>
<div class="line number2 index1 alt1" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; direction: ltr !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em 0px 0em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; white-space: pre !important; width: auto !important;">
<code class="plain plain" style="background-image: none !important; border-bottom-left-radius: 0px !important; border-bottom-right-radius: 0px !important; border-top-left-radius: 0px !important; border-top-right-radius: 0px !important; border: 0px !important; bottom: auto !important; box-sizing: content-box !important; color: rgb(185, 189, 182) !important; direction: ltr !important; display: inline !important; float: none !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">Programmer</code></div>
</div>
</td></tr>
</tbody></table>
</div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/16029318048542536255noreply@blogger.com0