tag:blogger.com,1999:blog-84608241906628640582024-03-16T00:08:29.337-07:00UPTU ExamUPTU exam , UPTU result, Free download Exam materials, previous year question papers, free ebooks & Providing Important Questions To Do their Exams Well and Totally a FREE SERVICE for all engineering streams (B.Tech) and you also check MTU / GBTU & UPTU result ,abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.comBlogger445125tag:blogger.com,1999:blog-8460824190662864058.post-16773921182879645742014-11-30T22:40:00.004-08:002014-11-30T22:45:59.202-08:00Free Download Core Java , Advanced Java and Framework Tutorials<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
<table border="1" bordercolor="#404040" cellpadding="7" cellspacing="0" style="page-break-before: always; width: 650px;"><colgroup><col width="440"></col><col width="145"></col></colgroup><tbody>
<tr valign="TOP"><td bgcolor="#000000" width="440"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<b><span style="background-color: black; color: lime;">Complete Java Tutorials</span></b></div>
</td><td bgcolor="#000000" width="88"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: lime;"><b>Download</b></span></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<b style="color: blue; font-size: x-large;">Core Java - Reflection Tutorial</b><span style="color: blue; font-size: large;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/core-java-reflection-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Core Java - </b></span><span style="color: blue; font-size: large;"><b>Basics of Core Java</b></span><span style="color: blue;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Core Java - Collections Framework </b></span><span style="color: blue;"> </span><span style="color: blue;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/core-java-collections-framework-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<b style="color: blue; font-size: x-large;">Core Java - Internationalization</b><span style="color: blue;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/core-java-internationalization-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<b style="color: blue; font-size: x-large;">Core Java - JDBC Tutorial</b><span style="color: blue;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/core-java-jdbc-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Advanced Java -Servlet Tutorial</b></span><span style="color: blue;"><span style="font-size: large;"> </span></span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/advanced-java-servlet-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Advanced Java - JSP Tutorial</b></span><span style="color: blue;"><span style="font-size: large;"> </span></span><span style="color: blue;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/advanced-java-jsp-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Framework - Struts 2 Tutorial</b></span><span style="color: blue;"><span style="font-size: large;"> </span></span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/java-framework-struts-2-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Advanced Java - Annotations</b></span><span style="color: blue;"><span style="font-size: large;"> </span></span><span style="color: blue;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/advanced-java-annotations-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<b style="color: blue; font-size: x-large;">Advanced Java - RMI</b></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/advanced-java-rmi-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Advanced Java - EJB 3.0</b></span><span style="color: blue;"><span style="font-size: large;"> </span></span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/advanced-java-ejb-30-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<span style="color: blue; font-size: large;"><b>Java Framework - Web Services</b></span><span style="color: blue;"><span style="font-size: large;"> </span></span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/java-framework-web-services-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<b style="color: blue; font-size: x-large;">Java Framework - Spring </b></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/java-framework-spring-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
<tr valign="TOP"><td width="440"><div style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<b style="color: blue; font-size: x-large;">Java Framework - Hibernate </b><span style="color: blue;"> </span></div>
</td><td width="145"><div align="CENTER" style="direction: ltr; margin-bottom: 0.08in; orphans: 2; widows: 2;">
<a href="http://www.uptuexam.com/2014/10/java-framework-hibernate-tutorial.html">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZyTfC0MQ0Pfe_PjXFsuGXVbQlG1HJcac_5kpgV7V3P1BOuwCzkJHBhuIA0JzUUf1Dih-5AOK0zyNZMV5g7uILgcFaYDKuF5WJ4Lc5cijuLC7xikn0UWQVhwRmsQZ-HSOQdBYi6cUxrI9/s1600/uptuexam.download.png" height="44" width="140" /></a></div>
</td></tr>
</tbody></table>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com15tag:blogger.com,1999:blog-8460824190662864058.post-16331562436483156092014-10-10T19:46:00.003-07:002014-10-10T19:46:42.881-07:00Free Download Core Java , Advanced Java and Framework Tutorials<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<span style="color: blue;"><span style="font-size: large;"><b>Core Java - Reflection Tutorial</b> </span> <a href="http://www.uptuexam.com/2014/10/core-java-reflection-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<br />
<br />
<span style="color: blue; font-size: large;"><b>Core Java - </b></span><span style="color: blue; font-size: large;"><b>Basics of Core Java</b></span><span style="color: blue;"> </span><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a><br />
<span style="color: blue;"><br /></span>
<span style="color: blue;"><br /></span>
<span style="color: blue;"><span style="font-size: large;"><b>Core Java - Collections Framework </b></span> <a href="http://www.uptuexam.com/2014/10/core-java-collections-framework-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue;"><span style="font-size: large;"><b>Core Java - Internationalization</b> </span> <a href="http://www.uptuexam.com/2014/10/core-java-internationalization-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue;"><span style="font-size: large;"><b>Core Java - JDBC Tutorial</b> </span> <a href="http://www.uptuexam.com/2014/10/core-java-jdbc-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Advanced Java -Servlet Tutorial</b></span><span style="color: blue;"><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/advanced-java-servlet-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Advanced Java - JSP Tutorial</b></span><span style="color: blue;"><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/advanced-java-jsp-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Framework - Struts 2 Tutorial</b></span><span style="color: blue;"><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/java-framework-struts-2-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Advanced Java - Annotations</b></span><span style="color: blue;"><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/advanced-java-annotations-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Advanced Java - RMI</b></span><span style="color: blue;"><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/advanced-java-rmi-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Advanced Java - EJB 3.0</b></span><span style="color: blue;"><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/advanced-java-ejb-30-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Java Framework - Web Services</b></span><span style="color: blue;"><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/java-framework-web-services-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></span><br />
<span style="color: blue;"><br /></span>
<span style="color: blue; font-size: large;"><b>Java Framework - Spring </b></span><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/java-framework-spring-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a><br />
<br />
<span style="color: blue; font-size: large;"><b>Java Framework - Hibernate </b></span><span style="font-size: large;"> </span> <a href="http://www.uptuexam.com/2014/10/java-framework-hibernate-tutorial.html"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixJME46bTYD0EiWN0TkbXOb8rr4TiyO45c8zv4oC1d3ORhlYGyrj_QcLwPKU9Ln_s_82lczAgpEK0Ule36WgYYRqwA6Fnq-bR9gv_eiZWAIAsLYv8yl3-Euzv1UVdzeEjR14IijiwonnB9/s1600/download-uptuexam.jpg" height="35" width="200" /></a></div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com6tag:blogger.com,1999:blog-8460824190662864058.post-13620126518443398552014-10-10T07:45:00.003-07:002015-01-16T10:13:04.943-08:00Java Framework - Hibernate Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDcVh5Qm1DOWdLcjg/view?usp=sharing" target="_blank">Java Framework - Hibernate Tutorial </a></b>
<br /><br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDcVh5Qm1DOWdLcjg/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com2tag:blogger.com,1999:blog-8460824190662864058.post-48923385821430643542014-10-10T07:44:00.003-07:002015-01-16T10:16:19.532-08:00 Java Framework - Spring Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDaWRROE9lSXNTTkE/view?usp=sharing" target="_blank"> Java Framework - Spring Tutorial </a></b>
<br /><br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDaWRROE9lSXNTTkE/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com1tag:blogger.com,1999:blog-8460824190662864058.post-30165795120707317782014-10-10T07:43:00.001-07:002015-01-16T10:17:59.658-08:00Java Framework - Web Services Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDeWpGU2Y1eTByR0E/view?usp=sharing" target="_blank">Java Framework - Web Services Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDeWpGU2Y1eTByR0E/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-90156958484004234182014-10-10T07:41:00.003-07:002015-01-16T10:18:44.385-08:00Advanced Java - EJB 3.0 Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDb3NDaXc4TnhVams/view?usp=sharing" target="_blank">Advanced Java - EJB 3.0 Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDb3NDaXc4TnhVams/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-76589365691241304932014-10-10T07:40:00.003-07:002015-01-16T10:19:27.630-08:00Advanced Java - RMI Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDWF9yQ1l0N3BTSE0/view?usp=sharing" target="_blank">Advanced Java - RMI Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDWF9yQ1l0N3BTSE0/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com4tag:blogger.com,1999:blog-8460824190662864058.post-14939003814460141862014-10-10T07:39:00.000-07:002015-01-16T10:20:15.131-08:00Advanced Java - Annotations Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDV0FVUV9GUHlNcEk/view?usp=sharing" target="_blank">Advanced Java - Annotations Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDV0FVUV9GUHlNcEk/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-61672429538856603072014-10-10T07:37:00.003-07:002015-01-16T10:22:54.444-08:00Java Framework - Struts 2 Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDTGhHY3dhcUFNZWs/view?usp=sharing" target="_blank">Java Framework - Struts 2 Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDTGhHY3dhcUFNZWs/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-37957116325067871742014-10-10T07:31:00.004-07:002015-01-16T10:23:49.017-08:00Advanced Java - JSP Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDX3N4WjVJbXpjN00/view?usp=sharing" target="_blank">Advanced Java - JSP Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDX3N4WjVJbXpjN00/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-62781498986320297912014-10-10T07:29:00.004-07:002015-01-16T10:25:06.578-08:00Advanced Java -Servlet Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDcGtJWUFUZFVXeW8/view?usp=sharing" target="_blank">Advanced Java -Servlet Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDcGtJWUFUZFVXeW8/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com4tag:blogger.com,1999:blog-8460824190662864058.post-86562130391134990172014-10-10T07:27:00.003-07:002015-01-16T10:26:08.207-08:00Core Java - JDBC Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDcEFwa3RKZ0dkTWs/view?usp=sharing" target="_blank">Core Java - JDBC Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDcEFwa3RKZ0dkTWs/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com12tag:blogger.com,1999:blog-8460824190662864058.post-19673920606517672572014-10-10T07:26:00.003-07:002015-01-16T10:27:04.508-08:00Core Java - Internationalization Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDV1Y1VVppUm5Wb1k/view?usp=sharing" target="_blank">Core Java - Internationalization Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDV1Y1VVppUm5Wb1k/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-90710832261666652562014-10-10T07:24:00.004-07:002015-01-16T10:27:35.520-08:00Core Java - Collections Framework Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDZWhGdmlTWktMams/view?usp=sharing" target="_blank">Core Java - Collections Framework Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDZWhGdmlTWktMams/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-38017044499625149432014-10-10T07:22:00.001-07:002015-01-16T10:28:09.844-08:00Core Java - Reflection Tutorial <div dir="ltr" style="text-align: left;" trbidi="on">
<span style="color: blue; font-size: large;">T</span>his free java tutorial for complete beginners will help you learn the java programming language and<br />
<br />
<span style="color: blue; font-size: large;">O</span>ur site provides tutorials on <b>core java</b> <b>,Jsp ,Servlet (J2EE)</b> and also provides various frameworks tutorials like <b>struts 2,spring,webservices</b> and <b>Hibernate</b> also covers deep concepts of JAVA<br />
<br />
<br />
<br />
<br />
<br />
<br />
<b style="background-color: white;"><span style="color: #38761d;">If you have any problems in downloading please click here</span></b> <b> <a href="https://drive.google.com/file/d/0BzcoGh222HjDWUdUUlo4OWxlSDA/view?usp=sharing" target="_blank">Core Java - Reflection Tutorial </a></b>
<br />
<br />
<iframe height="1500" src="https://drive.google.com/file/d/0BzcoGh222HjDWUdUUlo4OWxlSDA/view?usp=sharing" width="800"></iframe></div>abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com1tag:blogger.com,1999:blog-8460824190662864058.post-14938905997930115412014-08-14T05:32:00.002-07:002014-08-14T10:40:17.409-07:00Limitations of static methods & static block<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext disablelink" href="https://www.blogger.com/blogger.g?blogID=8460824190662864058#">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
Limitations of static methods & static block:-</h5>
<br />
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-line-height-alt: 10.0pt; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: "Courier New"; mso-fareast-font-family: "Courier New";">o<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif";">Only static data members
of a class can be referred in a static block or method.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpMiddle" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-line-height-alt: 10.0pt; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: "Courier New"; mso-fareast-font-family: "Courier New";">o<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif";">A static block or
static method can directly invoke only static methods.<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-line-height-alt: 10.0pt; mso-list: l0 level2 lfo1; text-align: justify; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: "Courier New"; mso-fareast-font-family: "Courier New";">o<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif";">‘this’ and ‘super’
keyword cannot be used in a static method or in
a static block.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<i><u><span lang="EN-US" style="font-family: "Times New Roman","serif";">Program below executes without </span></u></i><b><u><span lang="EN-US" style="font-family: "Times New Roman","serif";">‘main’</span></u></b><i><u><span lang="EN-US" style="font-family: "Times New Roman","serif";"> method
– <o:p></o:p></span></u></i></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">class
Test<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">static</span></b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“It is executing without main…..”);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.exit(0);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<br /></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<i><u><span lang="EN-US" style="font-family: "Times New Roman","serif";">Not only we can do this much but
also we can do list of things. See the program below : -<o:p></o:p></span></u></i></div>
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>class Test2</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>int a;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span class="Apple-tab-span" style="font-size: 12.800000190734863px; line-height: 15.600000381469727px; white-space: pre;"><span style="color: #006699; font-family: Verdana;"><b> </b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>public Test2(int x)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>a = x;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>public void display1()</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("a = " + a);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>static</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("Test is loaded.");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>Test2 t = new Test2(5);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>t.display1();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>P x = new P();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.exit(0);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>class P</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>public P()</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("P is instantiated.");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>static</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println("P is loaded.");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li></li>
</ol>
</div>
</div>
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<u><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">OUTPUT -</span></u><b><u><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></u></b></div>
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg7miQeHI298Ijs6wspk_USCXRkb6bkPkVmBpuhqmUJdSoQdYYr1a3XkG7bc1_JkmrxI-bg9QSDh5m8c6bnLFSTg3LhUIP8KrQ9OOk6glwCbC7OMqHx1gCbqAkcC4584uENv4lLmt4XNay/s1600/uptuexam_core_java.png" height="404" width="640" /></div>
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">Now, as we saw that we can do
almost everything without having <b>main( )</b>,
then <b>why we need main( )</b> <b>in our program?</b> <o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<i><span lang="EN-US" style="font-family: "Times New Roman","serif";">In the
sessions ahead, we will get the answer.<o:p></o:p></span></i></div>
<br />
<b><span style="font-size: large;"><br /></span></b>
<b><span style="font-size: large;"><u>Passing arguments to methods-</u></span></b><br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">In Java,
primitive type arguments are passed to methods by value i.e. their copy is
created in the invoked method.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">Objects
are passed by references i.e. in case of objects, copy of their reference
variables is created in the invoked method.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";"><b>Now the
program below is written to swap the values.</b><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify; text-indent: 36.0pt;">
<i><span lang="EN-US" style="font-family: "Times New Roman","serif";">Observe it carefully
to understand how this issue is being resolved.<o:p></o:p></span></i></div>
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class Swapper</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public static void swap(int x, int y)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>int z;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>z = x;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>x = y;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>y = z;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class SwapperTest</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public static void main(String[ ] args)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>int a =5, b = 6;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("a = " + a);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("b = " + b);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>Swapper.swap(a, b);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("After swap");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("a = " + a);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("b = " + b);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">The output is - </span></b><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></b></div>
<br />
<br />
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCrv8MMdbl5C23iMzl8q3VdSmQr5Lu6wxudTFyNz2EjfPHBNuhxXY9P-Y1IV2wC6giGC8IWzei5xIBfLP9mgMh7UO_7O77JS8K1fVr87FY67j20yVS6buABfrsHl61HzWH-U7eivzT0B4n/s1600/uptuexam_core_java.png" /><br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">Our
purpose is not solved. Let’s see the reason for this.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">See the
fig2. below<o:p></o:p></span></div>
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLVhTk1tNj_jEDmoN6xP3h87CW9Wo7UEKpzwqs0l8jFgeMWO9ctM74DEqHOP78ftUQMuQVHExBAiZQ-DUVxgs204a0VB3CAOXcHkcN4JEIGr6oNiwb2UMSABNQwLEd6b8hmX3gQtzgq8SH/s1600/uptuexam_core_java.png" height="354" width="640" /></div>
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">Now,
let’s find out solution to this problem.<o:p></o:p></span></div>
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class MyNumber</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>int value;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public MyNumber(int x)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>value = x;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class Swapper</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public static void swap(MyNumber x, MyNumber y)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>int z;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>z = x.value;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>x.value = y.value;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>y.value = z;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class SwapperTest</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public static void main(String[ ] args)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>MyNumber a = new MyNumber(5);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>MyNumber b = new MyNumber(6);</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>System.out.println("a = " + a.value);</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>System.out.println("b = " + b.value);</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>Swapper.swap(a, b);</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>System.out.println("After swap");</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>System.out.println("a = " + a.value);</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>System.out.println("b = " + b.value);</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>}</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><b>}</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
</ol>
</div>
</div>
Output –<br />
<br />
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxfappD3rWPhg17rct8CR5ikUR8d9cSpA7jElLd0Mx9PGmldrKWIk6tOXcIdhdhgqM0i3ilkIbcDvv79F4wNlryflV1h__0RT4ajmWNh5qFm9zvLhChH554q1cPyKWiG_cbUEuPZhlrrPi/s1600/uptuexam_core_java.png" /><br />
<br />
<br />
Now the problem is fixed as you can see the value is swapped. We handled it by passing value by reference.<br />
<b>Let see the explanation diagrammatically. (Fig. - 3)</b><br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1Zhl7Zf3IvZ0VvGuwfnrO7WrfRwlILBLpSAJ0mzUyE9agBDoDnBcuifZ0o6iwNoqUfNBbHyXejezS6qn6rnxMilrxeDfosngguFfKU_aDvxEtd3x3lObrtbzKA7jnnUQKBPJN6LgWHdI/s1600/uptuexam_core_java.png" height="310" width="320" /></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif";"><span style="color: red;">Question</span></span></b><span lang="EN-US" style="font-family: "Times New Roman","serif";"><span style="color: red;">.</span> Define a class named
Rational that contains <b>2 data members</b>
to store the value of numerator and denominator of a rational number, <b>default</b> & <b>two parameterized constructors</b>, a <b>display ( ) method</b> that displays the value of a rational object
in </span><!--[if supportFields]><span
lang=EN-US style='font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman"'><span style='mso-element:field-begin'></span><span
style='mso-spacerun:yes'> </span>QUOTE </span><span lang=EN-US
style='font-family:"Times New Roman","serif";position:relative;top:10.0pt;
mso-text-raise:-10.0pt'><v:shapetype id="_x0000_t75" coordsize="21600,21600"
o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f"
stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:5.4pt;
height:21pt' equationxml="<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?mso-application progid="Word.Document"?> <w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve"><w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/><o:DocumentProperties><o:Version>12</o:Version></o:DocumentProperties><w:docPr><w:view w:val="print"/><w:zoom w:percent="123"/><w:doNotEmbedSystemFonts/><w:defaultTabStop w:val="720"/><w:punctuationKerning/><w:characterSpacingControl w:val="DontCompress"/><w:optimizeForBrowser/><w:relyOnVML/><w:allowPNG/><w:validateAgainstSchema/><w:saveInvalidXML w:val="off"/><w:ignoreMixedContent w:val="off"/><w:alwaysShowPlaceholderText w:val="off"/><w:compat><w:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:dontGrowAutofit/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val="00167945"/><wsp:rsid wsp:val="000004C2"/><wsp:rsid wsp:val="00007776"/><wsp:rsid wsp:val="00011726"/><wsp:rsid wsp:val="00012F55"/><wsp:rsid wsp:val="00047E2C"/><wsp:rsid wsp:val="00055775"/><wsp:rsid wsp:val="000629EB"/><wsp:rsid wsp:val="00096D98"/><wsp:rsid wsp:val="0013638F"/><wsp:rsid wsp:val="00161B0F"/><wsp:rsid wsp:val="00167945"/><wsp:rsid wsp:val="001F5884"/><wsp:rsid wsp:val="002627D7"/><wsp:rsid wsp:val="00263594"/><wsp:rsid wsp:val="00287412"/><wsp:rsid wsp:val="0029187A"/><wsp:rsid wsp:val="0029725D"/><wsp:rsid wsp:val="002A5FBE"/><wsp:rsid wsp:val="002D3B76"/><wsp:rsid wsp:val="002E4E3D"/><wsp:rsid wsp:val="0030706A"/><wsp:rsid wsp:val="0034318A"/><wsp:rsid wsp:val="00345B8D"/><wsp:rsid wsp:val="0034760E"/><wsp:rsid wsp:val="00360757"/><wsp:rsid wsp:val="00423D3C"/><wsp:rsid wsp:val="004273AA"/><wsp:rsid wsp:val="00491AFB"/><wsp:rsid wsp:val="00492A80"/><wsp:rsid wsp:val="004A105E"/><wsp:rsid wsp:val="004C27FF"/><wsp:rsid wsp:val="00502972"/><wsp:rsid wsp:val="00503916"/><wsp:rsid wsp:val="0051468B"/><wsp:rsid wsp:val="00545EBA"/><wsp:rsid wsp:val="0055074F"/><wsp:rsid wsp:val="00556EB8"/><wsp:rsid wsp:val="0056657D"/><wsp:rsid wsp:val="005738FB"/><wsp:rsid wsp:val="0058069F"/><wsp:rsid wsp:val="00590499"/><wsp:rsid wsp:val="00595A3F"/><wsp:rsid wsp:val="005B62B2"/><wsp:rsid wsp:val="005E4D09"/><wsp:rsid wsp:val="005F08A0"/><wsp:rsid wsp:val="00664E2D"/><wsp:rsid wsp:val="00692261"/><wsp:rsid wsp:val="006E2C67"/><wsp:rsid wsp:val="0071433C"/><wsp:rsid wsp:val="007609E6"/><wsp:rsid wsp:val="0077280A"/><wsp:rsid wsp:val="007740AB"/><wsp:rsid wsp:val="007D2707"/><wsp:rsid wsp:val="007E6710"/><wsp:rsid wsp:val="00811AFE"/><wsp:rsid wsp:val="008265F0"/><wsp:rsid wsp:val="0083243F"/><wsp:rsid wsp:val="00845971"/><wsp:rsid wsp:val="00876BF7"/><wsp:rsid wsp:val="009360FC"/><wsp:rsid wsp:val="00954278"/><wsp:rsid wsp:val="009A4F24"/><wsp:rsid wsp:val="00A07D00"/><wsp:rsid wsp:val="00AA6D0E"/><wsp:rsid wsp:val="00AD432F"/><wsp:rsid wsp:val="00AD4CAD"/><wsp:rsid wsp:val="00B029E9"/><wsp:rsid wsp:val="00B5131B"/><wsp:rsid wsp:val="00B57D25"/><wsp:rsid wsp:val="00B83FAF"/><wsp:rsid wsp:val="00B845A5"/><wsp:rsid wsp:val="00BB07DA"/><wsp:rsid wsp:val="00BB4117"/><wsp:rsid wsp:val="00BB5E7C"/><wsp:rsid wsp:val="00BD1F1F"/><wsp:rsid wsp:val="00BD5E3A"/><wsp:rsid wsp:val="00BF08EB"/><wsp:rsid wsp:val="00BF0AA5"/><wsp:rsid wsp:val="00C07995"/><wsp:rsid wsp:val="00CA3DA9"/><wsp:rsid wsp:val="00CA57C5"/><wsp:rsid wsp:val="00CB4F53"/><wsp:rsid wsp:val="00CB5FD4"/><wsp:rsid wsp:val="00CC22CC"/><wsp:rsid wsp:val="00CE3D3B"/><wsp:rsid wsp:val="00D07BE0"/><wsp:rsid wsp:val="00D33881"/><wsp:rsid wsp:val="00D44B41"/><wsp:rsid wsp:val="00D47BFB"/><wsp:rsid wsp:val="00D64BA4"/><wsp:rsid wsp:val="00D65294"/><wsp:rsid wsp:val="00D660B9"/><wsp:rsid wsp:val="00D67530"/><wsp:rsid wsp:val="00D80BF6"/><wsp:rsid wsp:val="00DA13F7"/><wsp:rsid wsp:val="00E15116"/><wsp:rsid wsp:val="00E2002D"/><wsp:rsid wsp:val="00E23CF7"/><wsp:rsid wsp:val="00E47B6C"/><wsp:rsid wsp:val="00E73701"/><wsp:rsid wsp:val="00E8144C"/><wsp:rsid wsp:val="00E84FB8"/><wsp:rsid wsp:val="00EB691F"/><wsp:rsid wsp:val="00EC446C"/><wsp:rsid wsp:val="00ED1963"/><wsp:rsid wsp:val="00EF309B"/><wsp:rsid wsp:val="00F41E86"/><wsp:rsid wsp:val="00FA2A05"/></wsp:rsids></w:docPr><w:body><w:p wsp:rsidR="00000000" wsp:rsidRDefault="00845971"><m:oMathPara><m:oMath><m:f><m:fPr><m:ctrlPr><w:rPr><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><wx:font wx:val="Cambria Math"/></w:rPr></m:ctrlPr></m:fPr><m:num><m:r><w:rPr><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><wx:font wx:val="Cambria Math"/><w:i/></w:rPr><m:t>p</m:t></m:r></m:num><m:den><m:r><w:rPr><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><wx:font wx:val="Cambria Math"/><w:i/></w:rPr><m:t>q</m:t></m:r></m:den></m:f></m:oMath></m:oMathPara></w:p><w:sectPr wsp:rsidR="00000000"><w:pgSz w:w="12240" w:h="15840"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/><w:cols w:space="720"/></w:sectPr></w:body></w:wordDocument>">
<v:imagedata src="file:///E:\Users\Tinku\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"
o:title="" chromakey="white"/>
</v:shape></span><span lang=EN-US style='font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman"'><span
style='mso-spacerun:yes'> </span><span style='mso-element:field-separator'></span></span><![endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-text-raise: -10.0pt; position: relative; top: 10.0pt;"><v:shape equationxml="<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?mso-application progid="Word.Document"?>
<w:wordDocument xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml" xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2" xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve"><w:ignoreSubtree w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/><o:DocumentProperties><o:Version>12</o:Version></o:DocumentProperties><w:docPr><w:view w:val="print"/><w:zoom w:percent="123"/><w:doNotEmbedSystemFonts/><w:defaultTabStop w:val="720"/><w:punctuationKerning/><w:characterSpacingControl w:val="DontCompress"/><w:optimizeForBrowser/><w:relyOnVML/><w:allowPNG/><w:validateAgainstSchema/><w:saveInvalidXML w:val="off"/><w:ignoreMixedContent w:val="off"/><w:alwaysShowPlaceholderText w:val="off"/><w:compat><w:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:dontGrowAutofit/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val="00167945"/><wsp:rsid wsp:val="000004C2"/><wsp:rsid wsp:val="00007776"/><wsp:rsid wsp:val="00011726"/><wsp:rsid wsp:val="00012F55"/><wsp:rsid wsp:val="00047E2C"/><wsp:rsid wsp:val="00055775"/><wsp:rsid wsp:val="000629EB"/><wsp:rsid wsp:val="00096D98"/><wsp:rsid wsp:val="0013638F"/><wsp:rsid wsp:val="00161B0F"/><wsp:rsid wsp:val="00167945"/><wsp:rsid wsp:val="001F5884"/><wsp:rsid wsp:val="002627D7"/><wsp:rsid wsp:val="00263594"/><wsp:rsid wsp:val="00287412"/><wsp:rsid wsp:val="0029187A"/><wsp:rsid wsp:val="0029725D"/><wsp:rsid wsp:val="002A5FBE"/><wsp:rsid wsp:val="002D3B76"/><wsp:rsid wsp:val="002E4E3D"/><wsp:rsid wsp:val="0030706A"/><wsp:rsid wsp:val="0034318A"/><wsp:rsid wsp:val="00345B8D"/><wsp:rsid wsp:val="0034760E"/><wsp:rsid wsp:val="00360757"/><wsp:rsid wsp:val="00423D3C"/><wsp:rsid wsp:val="004273AA"/><wsp:rsid wsp:val="00491AFB"/><wsp:rsid wsp:val="00492A80"/><wsp:rsid wsp:val="004A105E"/><wsp:rsid wsp:val="004C27FF"/><wsp:rsid wsp:val="00502972"/><wsp:rsid wsp:val="00503916"/><wsp:rsid wsp:val="0051468B"/><wsp:rsid wsp:val="00545EBA"/><wsp:rsid wsp:val="0055074F"/><wsp:rsid wsp:val="00556EB8"/><wsp:rsid wsp:val="0056657D"/><wsp:rsid wsp:val="005738FB"/><wsp:rsid wsp:val="0058069F"/><wsp:rsid wsp:val="00590499"/><wsp:rsid wsp:val="00595A3F"/><wsp:rsid wsp:val="005B62B2"/><wsp:rsid wsp:val="005E4D09"/><wsp:rsid wsp:val="005F08A0"/><wsp:rsid wsp:val="00664E2D"/><wsp:rsid wsp:val="00692261"/><wsp:rsid wsp:val="006E2C67"/><wsp:rsid wsp:val="0071433C"/><wsp:rsid wsp:val="007609E6"/><wsp:rsid wsp:val="0077280A"/><wsp:rsid wsp:val="007740AB"/><wsp:rsid wsp:val="007D2707"/><wsp:rsid wsp:val="007E6710"/><wsp:rsid wsp:val="00811AFE"/><wsp:rsid wsp:val="008265F0"/><wsp:rsid wsp:val="0083243F"/><wsp:rsid wsp:val="00845971"/><wsp:rsid wsp:val="00876BF7"/><wsp:rsid wsp:val="009360FC"/><wsp:rsid wsp:val="00954278"/><wsp:rsid wsp:val="009A4F24"/><wsp:rsid wsp:val="00A07D00"/><wsp:rsid wsp:val="00AA6D0E"/><wsp:rsid wsp:val="00AD432F"/><wsp:rsid wsp:val="00AD4CAD"/><wsp:rsid wsp:val="00B029E9"/><wsp:rsid wsp:val="00B5131B"/><wsp:rsid wsp:val="00B57D25"/><wsp:rsid wsp:val="00B83FAF"/><wsp:rsid wsp:val="00B845A5"/><wsp:rsid wsp:val="00BB07DA"/><wsp:rsid wsp:val="00BB4117"/><wsp:rsid wsp:val="00BB5E7C"/><wsp:rsid wsp:val="00BD1F1F"/><wsp:rsid wsp:val="00BD5E3A"/><wsp:rsid wsp:val="00BF08EB"/><wsp:rsid wsp:val="00BF0AA5"/><wsp:rsid wsp:val="00C07995"/><wsp:rsid wsp:val="00CA3DA9"/><wsp:rsid wsp:val="00CA57C5"/><wsp:rsid wsp:val="00CB4F53"/><wsp:rsid wsp:val="00CB5FD4"/><wsp:rsid wsp:val="00CC22CC"/><wsp:rsid wsp:val="00CE3D3B"/><wsp:rsid wsp:val="00D07BE0"/><wsp:rsid wsp:val="00D33881"/><wsp:rsid wsp:val="00D44B41"/><wsp:rsid wsp:val="00D47BFB"/><wsp:rsid wsp:val="00D64BA4"/><wsp:rsid wsp:val="00D65294"/><wsp:rsid wsp:val="00D660B9"/><wsp:rsid wsp:val="00D67530"/><wsp:rsid wsp:val="00D80BF6"/><wsp:rsid wsp:val="00DA13F7"/><wsp:rsid wsp:val="00E15116"/><wsp:rsid wsp:val="00E2002D"/><wsp:rsid wsp:val="00E23CF7"/><wsp:rsid wsp:val="00E47B6C"/><wsp:rsid wsp:val="00E73701"/><wsp:rsid wsp:val="00E8144C"/><wsp:rsid wsp:val="00E84FB8"/><wsp:rsid wsp:val="00EB691F"/><wsp:rsid wsp:val="00EC446C"/><wsp:rsid wsp:val="00ED1963"/><wsp:rsid wsp:val="00EF309B"/><wsp:rsid wsp:val="00F41E86"/><wsp:rsid wsp:val="00FA2A05"/></wsp:rsids></w:docPr><w:body><w:p wsp:rsidR="00000000" wsp:rsidRDefault="00845971"><m:oMathPara><m:oMath><m:f><m:fPr><m:ctrlPr><w:rPr><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><wx:font wx:val="Cambria Math"/></w:rPr></m:ctrlPr></m:fPr><m:num><m:r><w:rPr><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><wx:font wx:val="Cambria Math"/><w:i/></w:rPr><m:t>p</m:t></m:r></m:num><m:den><m:r><w:rPr><w:rFonts w:ascii="Cambria Math" w:h-ansi="Cambria Math"/><wx:font wx:val="Cambria Math"/><w:i/></w:rPr><m:t>q</m:t></m:r></m:den></m:f></m:oMath></m:oMathPara></w:p><w:sectPr wsp:rsidR="00000000"><w:pgSz w:w="12240" w:h="15840"/><w:pgMar w:top="1440" w:right="1440" w:bottom="1440" w:left="1440" w:header="720" w:footer="720" w:gutter="0"/><w:cols w:space="720"/></w:sectPr></w:body></w:wordDocument>" id="_x0000_i1026" style="height: 21pt; width: 5.4pt;" type="#_x0000_t75">
<v:imagedata chromakey="white" o:title="" src="file:///E:\Users\Tinku\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png">
</v:imagedata></v:shape></span><!--[if supportFields]><span lang=EN-US style='font-family:
"Times New Roman","serif";mso-fareast-font-family:"Times New Roman"'><span
style='mso-element:field-end'></span></span><![endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"> form and <b>add
( ) methods</b> which are referenced by the following class.<o:p></o:p></span></div>
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span style="color: blue;"><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";">Answer</span></b><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-fareast-font-family: "Times New Roman";"> – <o:p></o:p></span></span></div>
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">package</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> StaticConceptualPrograms;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
Rational</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">, </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational() { }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(</span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> x, </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> y)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = x;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = y;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> display()</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">+</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"/"</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">+</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">); </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational add(Rational y)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = y.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">*</span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">this</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> + </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">this</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * y.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = y.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">*</span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">this</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">return</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">this</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational add(Rational x, Rational
y)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = y.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">*x.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> + x.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * y.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">numerator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = y.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">*x.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">denominator</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">return</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">this</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;">/*</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;"> static Rational add(Rational x,
Rational y)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;"> */</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">package</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> StaticConceptualPrograms;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
RationalTest</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">static</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> main(String[] args)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">Rational
a = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(2, 3);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">Rational
b = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(4, 5);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational a is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">a.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational b is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">b.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 115%;">Rational c = a.add(b);</span></span></div>
</li>
<li class="alt" style="border: none; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Sum of a & b : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">c.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">Rational
r = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(6, 5);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">Rational
s = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(4, 3);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">Rational
t = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">t.add(r,
s);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational r is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">r.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational s is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">s.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational r & s is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">t.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">Rational
<u>z</u>;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Sum of a, b, r & s is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;">//z
= Rational.add(c, t);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="color: #3f7f5f; font-family: "Times New Roman","serif"; font-size: 10.0pt;">//z.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="font-family: Verdana; font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span></div>
</li>
<li class="alt" style="border: none; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="font-size: 13px; line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: justify;">
<span lang="EN-US" style="font-size: 10pt;"><span style="font-family: Times New Roman, serif;">}</span></span></div>
</li>
</ol>
</div>
</div>
<br />
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif";">Output - <o:p></o:p></span></b></div>
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-no-proof: yes;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape id="Picture_x0020_15" o:spid="_x0000_i1025" style="height: 232.8pt; visibility: visible; width: 185.4pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///E:\Users\Tinku\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"></v:imagedata></v:shape></span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US; mso-no-proof: yes;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape id="Picture_x0020_15" o:spid="_x0000_i1025" style="height: 232.8pt; visibility: visible; width: 185.4pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///E:\Users\Tinku\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"></v:imagedata></v:shape></span><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWZR2aRNz0T43oGEOoiAs69teuG15JAp8ikyFavYUUSgnZS3XmuSYY7IzW2mz1hOA7EwCyKpu2LnQ_OjA9BV84_rmd5JXrksHWw2eT6VBSJv4_Nc6dKpdFXA1d2ZqZ2n-HqVS2zbaPiOct/s1600/uptuexam_core_java.png" /><br />
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; font-family: verdana; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
Rational</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">, </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational() {}</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(</span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> x, </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> y)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = x;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = y;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
display()</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">+</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"/"</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">+</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">); </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational add(Rational r)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational s = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> s.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * r.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> + </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * r.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> s.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * r.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">return</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> s;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> } </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
add(Rational a, Rational b)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = a.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * b.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> +
a.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * b.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = a.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * b.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">static</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
Rational add(Rational a, Rational b)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational c = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> c.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = a.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">p</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * b.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> +
a.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * b.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> c.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> = a.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> * b.</span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">q</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">return</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> c;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> } </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
RationalTest</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">static</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> main(String[] args)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational a = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(2, 3);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational b = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(4, 5);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational a is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational b is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> b.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational c =
a.add(b);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Sum of a & b : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> c.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational r = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(6, 5);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational s = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational(4, 3);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational t = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
</span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> t.add(r, s);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational r is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> r.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational s is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> s.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Rational r & s is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> t.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">""</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Rational z;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.print(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"Sum of a, b, r & s is : "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> z =
Rational.add(c, t);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> z.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
</span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; text-align: justify;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"><br /></span></div>
</li>
</ol>
</div>
</div>
<br />
<br />
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 11.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">To
understand the logic used inside the different methods of <b>Rational</b> class, please see the diagrams below</span><br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiyP8Fuf69L6YYhfShT99fpBvyhZ28CurYVcHkNieNtYMcFe5XbGr2nl62arpoDtacLfdRT1Q_9CAZ77JOweyI2-icQHKluBBSPxDK-v5tmIaAOsPZH7zGMaeNha3BUPHBfpNpWzTUCsQEm/s1600/uptuexam_core_java.png" height="291" width="320" /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<br /></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">Figure
(20.a) to understand <b>public Rational
add(Rational r) method</b><o:p></o:p></span></div>
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzwsSsPK5HFnpXgjTcD0GD4uxCgQVHpS-a9vovi8kshLlvPt5v4ZyovNHI08gRaKgS1hJRkx8cy9KpvES_yW9LG1a3DsaQAqcnB08jBmNb83yIyg0XyLfr9UHcoZaJlL6cwNVdce-tEUex/s1600/uptuexam_core_java.png" height="285" width="320" /></div>
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif";">Program - <o:p></o:p></span></b></div>
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; font-family: verdana; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Test1</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">a</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">, </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">b</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Test1(</span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a, </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> b)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a=a;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> b=b;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">static</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> main(String[] args)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Test1 t = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> Test1(5, 6);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> t.display();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
display()</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"a = "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> + </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">a</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.</span><i><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">out</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">.println(</span><span lang="EN-US" style="color: #2a00ff; font-family: "Times New Roman","serif"; font-size: 10.0pt;">"b = "</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> + </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">b</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">);</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">
</span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"><br /></span></div>
</li>
</ol>
</div>
</div>
<br />
Output -<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHK44a1rjXyxrA7EI1feTfbjuyFY3dERtFiYWVDJaL-opYwFWOLvbgn2WDnINTAbkrYdc5Y3WkhLfl3fnFbcYSoEiVlXfNFvkHy2C-aDE2iiEegUUbwT0DGF34yx7Xoe8bQbxMifSzMHt-/s1600/uptuexam_core_java.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHK44a1rjXyxrA7EI1feTfbjuyFY3dERtFiYWVDJaL-opYwFWOLvbgn2WDnINTAbkrYdc5Y3WkhLfl3fnFbcYSoEiVlXfNFvkHy2C-aDE2iiEegUUbwT0DGF34yx7Xoe8bQbxMifSzMHt-/s1600/uptuexam_core_java.png" /></a><br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext disablelink" href="https://www.blogger.com/blogger.g?blogID=8460824190662864058#">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com15tag:blogger.com,1999:blog-8460824190662864058.post-9623069040550180772014-08-14T05:09:00.002-07:002014-08-14T10:40:37.910-07:00At the time of class loading following sequence of steps is performed by JRE<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/static-keyword_14.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
At the time of class loading following sequence of steps is performed by JRE</h5>
<br />
(1).<span class="Apple-tab-span" style="white-space: pre;"> </span>Static <b>Data Members</b> (if defined) are created in the Class Area.<br />
(2).<span class="Apple-tab-span" style="white-space: pre;"> </span>Static Initializer <b>Block</b> (if defined) is executed.<br />
(3).<span class="Apple-tab-span" style="white-space: pre;"> </span>Reference of the class which resulted in class loading is resolved i.e. <b>operation represented</b> by the reference is performed.<br />
<div>
<br /></div>
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class </span><span style="color: #006699;">A</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>static </b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println(“A is loaded.”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span class="Apple-tab-span" style="font-size: 12.800000190734863px; line-height: 15.600000381469727px; white-space: pre;"><span style="color: #006699; font-family: Verdana;"><b> </b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>public A()</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>System.out.println(“A is instantiated.”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class</span><span style="color: #006699;"> B</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>static int b;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span class="Apple-tab-span" style="font-size: 12.800000190734863px; line-height: 15.600000381469727px; white-space: pre;"><span style="color: #006699; font-family: Verdana;"><b> </b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>static</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>b=5;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“B is loaded.”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class</span><span style="color: #006699;"> C</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>static</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“C is loaded.”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span class="Apple-tab-span" style="font-size: 12.800000190734863px; line-height: 15.600000381469727px; white-space: pre;"><span style="color: #006699; font-family: Verdana;"><b> </b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>public static void display( )</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“Display( ) of C is invoked.”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span class="Apple-tab-span" style="font-size: 12.800000190734863px; line-height: 15.600000381469727px; white-space: pre;"><span style="color: #006699; font-family: Verdana;"><b> </b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class</span><span style="color: #006699;"> D</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>static</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“D is loaded.”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span class="Apple-tab-span" style="font-size: 12.800000190734863px; line-height: 15.600000381469727px; white-space: pre;"><span style="color: #006699; font-family: Verdana;"><b> </b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="color: #006699; white-space: pre;"> </span><span style="color: #990000;">public static void </span><span style="color: #006699;">main(String args[])</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“Instantiating A………”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>A x = new A();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“Referencing static data member b of B……”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“b of B is : “ + B.b);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“Invoking static method of C……”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>C.display();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(“Instantiating A again.”);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>A y = new A();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b> </b></span></span></li>
<li></li>
</ol>
</div>
</div>
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCX-_Umc_4Mt-RBi5qAQuUIi93dTB2bbmsz0wjKAXPCTfhoY2aLISl7BLLSoX-ZS3qft1q9w_oz0xd9_3oYsw1meYISRKgWu6k_rGnwNLdp7UZLO-QX4PLi1F8j3OQMQDjSmR5oPdKPZGJ/s1600/uptuexam_core_java.png" height="500" width="640" /></div>
<br />
<br />
<br />
<br />
<hr />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">class
E<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> s</span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">tatic
int a = 5;</span></b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public static void main(String
args[])<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“a = “ + a);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<br />
<table cellpadding="0" cellspacing="0" style="width: 100%px;">
<tbody>
<tr>
<td><!--[endif]-->
<br />
<div>
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span lang="EN-US">After compilation<o:p></o:p></span></b></div>
</div>
<!--[if !mso]--></td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<v:shapetype coordsize="21600,21600" id="_x0000_t202" o:spt="202" path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter">
<v:path gradientshapeok="t" o:connecttype="rect">
</v:path></v:stroke></v:shapetype><v:shape id="_x0000_s1027" style="height: 36.05pt; left: 0; margin-left: 159.4pt; margin-top: 10.9pt; mso-height-relative: margin; mso-width-relative: margin; position: absolute; text-align: left; width: 86.85pt; z-index: 251624448;" type="#_x0000_t202">
<v:textbox>
<!--[if !mso]-->
<!--[endif]--></v:textbox>
</v:shape><v:shapetype adj="16200,5400" coordsize="21600,21600" id="_x0000_t67" o:spt="67" path="m0@0l@1@0@1,0@2,0@2@0,21600@0,10800,21600xe">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="val #0">
<v:f eqn="val #1">
<v:f eqn="sum height 0 #1">
<v:f eqn="sum 10800 0 #1">
<v:f eqn="sum width 0 #0">
<v:f eqn="prod @4 @3 10800">
<v:f eqn="sum width 0 @5">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path o:connectangles="270,180,90,0" o:connectlocs="10800,0;0,@0;10800,21600;21600,@0" o:connecttype="custom" textboxrect="@1,0,@2,@6">
<v:handles>
<v:h position="#1,#0" xrange="0,10800" yrange="0,21600">
</v:h></v:handles>
</v:path></v:stroke></v:shapetype><v:shape id="_x0000_s1026" style="height: 70.75pt; left: 0; margin-left: 129.05pt; margin-top: 4.85pt; position: absolute; text-align: left; width: 33.55pt; z-index: 251623424;" type="#_x0000_t67"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></v:shape></div>
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">class
E<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> s</span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">tatic
int a;</span></b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> static<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">a = 5;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">----<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">----<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">-------------------------------------------------------------------------------------------------------<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">class
E<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int
a = 5, b=6;</span></b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public static void main(String
args[])<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E x = new E();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“a = “ + x.a);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“b = “ + x.b);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<v:shapetype adj="16200,5400" coordsize="21600,21600" id="_x0000_t67" o:spt="67" path="m0@0l@1@0@1,0@2,0@2@0,21600@0,10800,21600xe">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="val #0">
<v:f eqn="val #1">
<v:f eqn="sum height 0 #1">
<v:f eqn="sum 10800 0 #1">
<v:f eqn="sum width 0 #0">
<v:f eqn="prod @4 @3 10800">
<v:f eqn="sum width 0 @5">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path o:connectangles="270,180,90,0" o:connectlocs="10800,0;0,@0;10800,21600;21600,@0" o:connecttype="custom" textboxrect="@1,0,@2,@6">
<v:handles>
<v:h position="#1,#0" xrange="0,10800" yrange="0,21600">
</v:h></v:handles>
</v:path></v:stroke></v:shapetype><v:shape id="_x0000_s1026" style="height: 70.75pt; left: 0; margin-left: 129.05pt; margin-top: 8.4pt; position: absolute; text-align: left; width: 33.55pt; z-index: 251625472;" type="#_x0000_t67"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></v:shape></div>
<table cellpadding="0" cellspacing="0" style="width: 100%px;">
<tbody>
<tr>
<td><!--[endif]-->
<br />
<div>
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span lang="EN-US">After compilation<o:p></o:p></span></b></div>
</div>
<!--[if !mso]--></td>
</tr>
</tbody></table>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<v:shapetype coordsize="21600,21600" id="_x0000_t202" o:spt="202" path="m,l,21600r21600,l21600,xe">
<v:stroke joinstyle="miter">
<v:path gradientshapeok="t" o:connecttype="rect">
</v:path></v:stroke></v:shapetype><v:shape id="_x0000_s1027" style="height: 36.05pt; left: 0; margin-left: 159.4pt; margin-top: 10.9pt; mso-height-relative: margin; mso-width-relative: margin; position: absolute; text-align: left; width: 86.85pt; z-index: 251626496;" type="#_x0000_t202">
<v:textbox>
<!--[if !mso]-->
<!--[endif]--></v:textbox>
</v:shape><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">class
E<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int
a, b;</span></b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E( )<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">a = 5;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">b = 6;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">----<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">----<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">-------------------------------------------------------------------------------------------------------<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> E</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> int a=5, b=6; </span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public E ()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.out.println(“Default.”);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public E(int x)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a=x;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.out.println(“One
parameterized.”);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public E(int x, int y)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> b=y;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.out.println(“Two
parameterized.”);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">public void display()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“a = “ + a);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“b = “ + b);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public static void main(String
args[])<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E x = new E();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E y = new E(10);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E z = new E(40, 50);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">x.display();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">y.display();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">z.display();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhX-D9bgLzQvIzUzAxKrHu3HVTJghrJrwUhPbvOSAjEFoxkRho3gw9-rEKnRY8ZrH_kEhrM3GgS_Pwmaaf4c-IaWzcNqhIhNagtsjusnMw6Ot_6Sy802vH4rOee5awdb8QvXN8-Tdp_ZCwS/s1600/uptuexam_core_java.png" height="640" width="586" /></div>
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span lang="EN-US" style="line-height: 115%;">After
compilation,<o:p></o:p></span></b></div>
<br />
<div align="center" class="MsoNormal" style="text-align: center;">
<b><span lang="EN-US" style="line-height: 115%;">the compiler
will do the following for the same program<span style="font-size: 7pt;"><o:p></o:p></span></span></b></div>
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; font-family: verdana; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> E</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> int a, b;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public E()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a=5, b=6;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.out.println(“Default.”);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public E(int x)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a=5, b=6;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a=x;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.out.println(“One
parameterized.”);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public E(int x, int y)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> a=5, b=6;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> b=y;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> System.out.println(“Two
parameterized.”);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">public void display()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“a = “ + a);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">System.out.println(“b = “ + b);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> public static void main(String
args[])<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E x = new E();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E y = new E(10);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">E z = new E(40, 50);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">x.display();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">y.display();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">z.display();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"><br /></span></li>
</ol>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/static-keyword_14.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-4999949502366155082014-08-14T04:48:00.003-07:002014-08-14T10:40:49.400-07:00Static Keyword<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/anonymous-block.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
Static Keyword</h5>
<br />
Is used to define class members.<br />
In a class we can have following <b>3 types of class members</b>:-<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<br /></div>
<br />
<ol style="text-align: left;">
<li>STATIC DATA MEMBERS</li>
<li>STATIC INITIALIZE BLOCK</li>
<li>STATIC METHODS.</li>
</ol>
<br />
<div>
<br /></div>
<br />
<b><span style="color: blue;"><u>(1) STATIC DATA MEMBERS</u></span></b><br />
<br />
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">Represents class
attributes. A single copy of static data members is created when the class is
loaded. This copy can be shared by all the objects of the class.<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpLast" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><br /></span></b></div>
<div class="MsoListParagraphCxSpLast" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">For example -<o:p></o:p></span></b></div>
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class</span><span style="color: #006699;"> A</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>int a, b;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>static int c;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>-------</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b> -------<span class="Apple-tab-span" style="white-space: pre;"> </span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li></li>
</ol>
</div>
</div>
<br />
<div class="MsoListParagraph" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">When we create objects of this class in some other class what
happens is explained in the given adjoining fig1.</span></b><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></b></div>
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpzm0ANndOtINxVSYnxtn3PH91GuOB9TkcIhlR0qVb0IvL9HdkA_DUEXLVxJm87H1XYA4YielPBmgYOKqD13ug4-qJ0yU2b1_1nEAFXJgkCt0JbAOrXADS6jxM7iaogwr76I5izAhi9N5v/s1600/uptuexam_core_java.png" height="278" width="640" /></div>
<br />
<span style="font-family: 'Times New Roman', serif; text-align: justify;">Fig1.</span><br />
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-line-height-alt: 10.0pt; text-align: justify;">
<i><span lang="EN-US" style="font-family: "Times New Roman","serif";">For
the execution of a Java Application, memory is divided into three parts called<o:p></o:p></span></i></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; mso-list: l0 level1 lfo2; text-align: justify; text-indent: -15.3pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif";"><b>Stack</b>
- LOCAL VARIABLES of methods are stored in STACK.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 70.9pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -14.2pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif";"><b>Heap</b>
- OBJECTS are created in the HEAP.<o:p></o:p></span></div>
<div class="MsoListParagraphCxSpFirst" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 70.9pt; margin-right: 0cm; margin-top: 0cm; mso-add-space: auto; mso-line-height-alt: 10.0pt; mso-list: l1 level1 lfo1; text-align: justify; text-indent: -14.2pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif";"><b>Class
Area</b> - STATIC<b> </b>DATA MEMBERS are saved
in CLASS<b> </b>AREA.<o:p></o:p></span></div>
<br />
<div class="MsoListParagraphCxSpLast" style="margin-bottom: .0001pt; margin-bottom: 0cm; mso-add-space: auto; mso-line-height-alt: 10.0pt; text-align: justify;">
<br /></div>
<b><span style="color: blue;">(2) STATIC INITIALIZE BLOCK</span></b><br />
<b><span style="color: blue;"><br /></span></b>
<b><span style="color: blue;">(3) STATIC METHODS.</span></b><br />
<div>
<br /></div>
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; font-family: verdana; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">class</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> A</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">{</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><span lang="EN-US" style="color: #0000c0; font-family: "Times New Roman","serif"; font-size: 10.0pt;">a, b</span><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> static int c;</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> ---------- <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> ----------<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">public</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> static </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">void</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> main(String[] args)</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> {</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> A x = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> A();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> A y = </span><b><span lang="EN-US" style="color: #7f0055; font-family: "Times New Roman","serif"; font-size: 10.0pt;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> A();</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> -------------<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">-------------</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"> }</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;">}<o:p></o:p></span></div>
</li>
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 10pt;"><br /></span></li>
</ol>
</div>
</div>
<br />
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjbFl67ZxXSLazkWoZDHn3FQMkXnp0azQ845lpx8ltehTYgFhFCD0wD4grT-5aXYy9NwpEeCJwJcK4Nsa9yI5dhLAhYzB1JrSiVf5H06-1LoeMJoE7-8AgIJTLheWkqtA60BmIPoYuj8ma/s1600/uptuexam_core_java.png" height="262" width="640" /></div>
<br />
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify; text-indent: 36.0pt;">
<i><span lang="EN-US" style="font-family: "Times New Roman","serif";">Memory Representation
During the execution of main() method of class A.<o:p></o:p></span></i></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">Static
Initializer Block- is used to initialize <i>static
data members</i> of a class.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<u><span lang="EN-US" style="font-family: "Times New Roman","serif";"><span style="color: blue;">Syntax
–</span><o:p></o:p></span></u></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<u><span lang="EN-US" style="font-family: "Times New Roman","serif";"><br /></span></u></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">static</span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";">{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; tab-stops: 99.25pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";"> Statements<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 72.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<span lang="EN-US" style="font-family: "Times New Roman","serif";"><span style="font-family: 'Times New Roman', serif;">}</span> <o:p></o:p></span></div>
<br />
<br />
<br />
Static initialize is executed only once, just after a class is loaded.<br />
In Java, a class can be loaded in either of the following ways:-<br />
<br />
<b>(1). Through Explicit Introduction.</b><br />
<b>(2). Through Implicit References.</b><br />
<br />
In the first approach class to be loaded is explicitly introduced to the JRE.<br />
<div>
<br /></div>
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGhGofhoOKK7_2QZdE2lcF1dyPlMWHDuRg9-ahnfzrVyB_2cTqvPWtHNT5zVcaOdHDRjOiZLqmHZ_PE11RhRvOQuhiUn026XeaR9kxCDyBgZz7mHY9hu9rHgkWMLYVN10Kz-FHeztCg3dR/s1600/uptuexam_core_java.png" height="386" width="640" /></div>
<br />
<br />
<br />
Only a single class is loaded in an application using explicit introduction. Rests of the classes are <b>loaded through implicit reference.</b><br />
When a reference of a class is encountered first time in an already loaded class then JRE implicitly loads it before performing the operation represented by the class reference.<br />
<div>
<br /></div>
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class </span><span style="color: #006699;">A</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="color: #006699; white-space: pre;"> </span><span style="color: #990000;">public static void</span><span style="color: #006699;"> main(String[ ] args)</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>B x = new B();//Reference of B is contained in A</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>-------------</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>-------------</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span class="Apple-tab-span" style="white-space: pre;"> </span>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><br /></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class </span><span style="color: #006699;">B</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b> -------------</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b> -------------</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li></li>
</ol>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/anonymous-block.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-73753787080027404072014-08-14T04:37:00.001-07:002014-08-14T10:41:01.608-07:00Anonymous Block<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/constructor.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/static-keyword_14.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
Anonymous Block</h5>
<br />
<span lang="EN-US" style="font-family: 'Times New Roman', serif; line-height: 115%;">Is
a convenience provided to java developers to define statements common to all
constructors of a class. At the time of compilation statements of anonymous
block are moved at the beginning of each constructor by the compiler.</span><br />
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlEuUdkjOKJsjINV_U5kKoddDbEzyShoRac-UASm4_lK0tgpmXb3ol4Xb7Q6F04YZRoDJ_cpaJOTfL39bdPYeJ9SYSdZAjlfos1xaYzF9r2HBqelBIWjaGHuT8TnRpM06uuMQV9CYFL3DJ/s1600/uptuexam_core_java.png" height="502" width="640" /></div>
<br />
<br />
<span style="font-size: large;">OR</span><br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-line-height-alt: 10.0pt; text-align: justify;">
<i><u><span lang="EN-US" style="font-family: "Times New Roman","serif";"> The same program we can also write like this:<o:p></o:p></span></u></i></div>
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxpdxHej8jE_ZOKI4Se6MZbCkjsxoYBhwI0F9meF4qaUl1cVJs-vCLBcylUO4jUEffJra9rwnSImnPagOU5PXZfpjLl58YUTNuTtVuQ7WEDJTOPXiOO1SGbEwxPnVIf9LmZJnpW9HyyPHJ/s1600/uptuexam_core_java.png" height="498" width="640" /></div>
<br />
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjF2MstWITlTGlU506gYhFCS3IMPicdDZ3QpKDF8ioRyG-8VxjyRtJURCbjdxL2iZnMLYpw0z5GgFFoHu-lhbf3pcORJGRNmiKg9EKEDGk-v6ZUdVhmuf6AxVw7VbyqGJ1OYdj4qPxsvtSH/s1600/uptuexam_core_java.png" height="320" width="640" /></div>
<br />
<br />
<br />
<div style="text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguXMjJ1sr24TQXloZOakL96OApiZ31oujbTL9Am70v949SrmMq1yqDAh4hWMCWXzFH2T-OP4hVgZWIMGwZZyHTXMtzaq3XuiKtI17xjYGYOZbKXxxp0wHXT749RKyWA5ngKHgM3R3LSqK-/s1600/uptuexam_core_java.png" height="640" width="604" /></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/constructor.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/static-keyword_14.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-90140042942533163452014-08-14T04:29:00.000-07:002014-08-14T10:41:16.878-07:00CONSTRUCTOR<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/anonymous-block.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
CONSTRUCTOR</h5>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings;">Ø<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><i><span lang="EN-US" style="font-family: 'Times New Roman', serif;">It is special
member of a class that has following characteristics :</span></i><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Courier New';">o<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">It has the same name as of its class.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Courier New';">o<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">It does not have an explicit return type.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Courier New';">o<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">It is implicitly invoked just after an object is
created.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 108.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Courier New';">o<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">It is used to initialize data members of objects.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">Rectangle r = </span><b><span lang="EN-US" style="color: #7f0055; font-family: 'Times New Roman', serif;">new</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"> Rectangle();<o:p></o:p></span></div>
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 70.9pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">1.<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">Rectangle r; //Reference
Variable created</span><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 70.9pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">2.<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">r = new Rectangle(); //memory
allocation for object</span><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 70.9pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">3.<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">r.Rectangle(5, 4); //Constructor
is invoked<span style="font-size: x-small;"><o:p></o:p></span></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Let’s see it again : <o:p></o:p></span></div>
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUD9nu1lMwJ1PyRvofj1M2JtyDk4s18nEcXNiF1aZ7DHh8BGfnLbp1ELQlSXiaq2gjjWPiDqvTYxRXXcvzdOHaQRQdpxmQg42vmZK1HhCPHWRGroKQaDsp_IXGmzXag-URiyPqL5xyJKuE/s1600/uptuexam_core_java.png" height="278" width="640" /></div>
<br />
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">If a class doesn’t contain any constructor then default constructor is
provided by the compiler at the time of compilation but if a class contains any
parameterized constructor and there is an object of the class which requires
default constructor for its initialization then default constructor need to be
defined in the class. In this case, it won’t be provided by the compiler.</span><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<span lang="EN-US" style="font-family: 'Times New Roman', serif; line-height: 115%;"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape id="_x0000_i1025" style="height: 183.6pt; width: 246.6pt;" type="#_x0000_t75">
<v:imagedata o:title="" src="file:///E:\Users\Tinku\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"></v:imagedata></v:shape></span><br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: 0cm;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Symbol;"><span style="mso-list: Ignore;">·<span style="font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; line-height: normal;">
</span></span></span><!--[endif]--><b><span lang="EN-US" style="font-family: 'Times New Roman', serif;">javap</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"> – to know what is kept in <b>.class</b> file<o:p></o:p></span></div>
<br />
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9tX1hVMBBQ4EdYLg3ly7i6njl82DTdm_5SsRchrBVdfGFssV4If3qQECBAW4mmOYYAc94_flXq-EvivPj-qZ5Oigp1qyVh1kAieLflwDYEAB2Ncic1IZehSXQyQHsT5eFBk7og0sIV4d_/s1600/uptuexam_core_java.png" height="297" width="400" /></div>
<br />
<br />
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Courier New';">o<span style="font-family: 'Times New Roman'; line-height: normal;"> <span style="color: red;"> </span></span></span><!--[endif]--><b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: red;">Question</span></span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: red;">:</span> <i>Why compiler
provides a default constructor if a class doesn’t contain any constructor and
why it doesn’t provide the default constructor when a class contains any
parameterized constructor?</i><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<span lang="EN-US" style="font-family: 'Courier New';"><br /></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level2 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: 'Courier New';">o<span style="font-family: 'Times New Roman'; line-height: normal;"> <span style="color: blue;"> </span></span></span><!--[endif]--><b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;">Solution</span></span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level3 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings;">§<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><b><span lang="EN-US" style="font-family: 'Times New Roman', serif;">Overloading</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"> – If a class contains multiple implementations of a
method or constructor then method or constructor is said to be overloaded.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level3 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><br /></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level3 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings;">§<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">Implementations of overloaded method or constructor
are differentiated either by varying the number of arguments or by varying
their type of arguments.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level3 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><br /></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level3 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings;">§<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--><b><span lang="EN-US" style="font-family: 'Times New Roman', serif;">Overloading</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"> is one of the means of implementing polymorphism.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 63.8pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level3 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><br /></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level5 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><b><span lang="EN-US" style="font-family: 'Courier New';">o<span style="font-family: 'Times New Roman'; line-height: normal;"> </span></span><!--[endif]--></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><b>Let’s see the advantage of overloading –</b><span style="font-size: x-small;"><o:p></o:p></span></span></div>
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">PROGRAM </span><span style="color: #006699;">Test.java</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class Test</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #990000;">public static void </span><span style="color: #006699;">main(String[] args)</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>int a = 5;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>boolean b = false;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>char c = 'A';</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(a);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(b);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println(c);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<u><span lang="EN-US" style="font-family: 'Times New Roman', serif; font-size: 12pt;"><b>OUTPUT
-<o:p></o:p></b></span></u></div>
<br />
<div style="text-align: left;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjwyi9Pd1oprm7xr6Jb8y28AaVar7znnDZ7a9c273kTgszBLERfiNR1ad_fiu2t7CUF87CefZYaAqEq46-xWiNZgt0ijCzWQDU3la171yVithiA0F0a1lRmxIQUdudPfzO-HnzSwujFYLQ/s1600/uptuexam_core_java.png" /></div>
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: red; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>class A</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>int a;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public A(int x)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>a=x;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b></b></span></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>}</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>{</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>System.out.println("It is unusual....");</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>}</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>public void display( )</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>{</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>System.out.println("a=" +a);</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>}</b></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b><span style="color: #990000;">public static void </span><span style="color: #006699;">main(String[ ] args)</span></b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>{</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>A p = new A(10);</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>A q = new A(20);</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>p.display();</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>q.display();</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>}</b></span></li>
<li class="alt" style="border: none; color: #006699; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><b>}</b></span></li>
</ol>
</div>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/anonymous-block.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com1tag:blogger.com,1999:blog-8460824190662864058.post-10581365497915883862014-08-12T10:40:00.005-07:002014-08-14T10:41:29.772-07:00Type Casting / Type Conversion<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/what-is-datatype.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/constructor.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
Type Casting / Type Conversion</h5>
<br />
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<span lang="EN-US" style="font-size: 10pt;"><span style="font-family: Georgia, Times New Roman, serif;">Converting the values of one type to another for the evaluation of an
expression is called type casting or type conversion.<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<br /></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<span lang="EN-US" style="font-size: 10pt;"><span style="font-family: Georgia, Times New Roman, serif;"><br /></span></span></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<span lang="EN-US" style="font-size: 10pt;"><span style="font-family: Georgia, Times New Roman, serif;"><br /></span></span></div>
<br />
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left; text-indent: 18pt;">
<u><span lang="EN-US"><span style="font-family: Georgia, Times New Roman, serif;">Type casting is of two types:-</span><span style="font-family: Times New Roman, serif; font-size: 10pt;"><o:p></o:p></span></span></u></div>
<br />
<u><span style="color: blue;">1) <b>Upcasting</b></span> </u>– Conversion of lower types to upper types is called upcasting. Upcasting is implicitly performed.<br />
<br />
Upcasting is performed according to the following graph:-<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivMMJp_Wcb8M7dOH1jUeWB57tEu-vHTuzI_yOO2kfNE83ZOdhzSri4a1D0gvb28WxAjKXtnTpYAVT5LLEikbKc4TtVYye0BCIxutRPYz71JtUVnFi-Qg8wcVstKZu3-OKuBLhwJ4lA3oRs/s1600/uptuexam_core_java.png" height="432" width="640" /></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Explanation</span></b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"> - <o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">a.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal;">
</span></span></b><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Let n be an
integer and n = 2<sup>n</sup> then to store n in memory in integer
representation k bits are required.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">For e.g<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">32768 = 2<sup>15<o:p></o:p></sup></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">0 111111111111111<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">15 bits are required to store 32768.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">b.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal;">
</span></span></b><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">In floating
point representation number is not stored rather its exponent is stored.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">i.e<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">32768 = 2<sup>15<o:p></o:p></sup></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Then only 15 need to be stored.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">n=2<sup>k</sup> and k = 2<sup>l</sup> where l<k then to store n only l
bits are required.<o:p></o:p></span></div>
<br />
<br />
<u><span style="color: blue;"><b>2) Downcasting</b></span></u> – Conversion of higher types to lower type is called downcasting. Downcasting need to be explicitly performed.<br />
<br />
<div style="text-align: left;">
<span style="color: #6aa84f;"> Syntax –</span></div>
<div style="text-align: left;">
(target type) expression;</div>
<br />
<br />
<span style="color: red;">Example- </span>float f = 12.45; <b> </b><span style="color: purple;"><b>==========></b> </span> float f = (float)12.45; <b style="color: #38761d;">OR </b>float f = 12.45f;<br />
<span style="color: #990000;"> <span style="font-size: xx-small;">By this statement compiler</span></span><br />
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">PROGRAM </span><span style="color: #006699;">– Rectangle.java</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class Rectangle</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>private int l, b;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public void Rectangle(int x, int y)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>l = x;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>b = y;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public void display()</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("Length = " + l);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("Breadth = " + b);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public int area()</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>return l * b;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public void setDimension(int x, int y)</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>l = x;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>b = y;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>Syntax of creating object of a class-</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>className ReferenceVariable = new className();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>OR</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>className ReferenceVariable;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>ReferenceVariable = new className();</b></span></span></li>
</ol>
</div>
</div>
<br />
<br />
<br />
<b>Reference Variable</b> – is an implicit pointer that contains the reference of a class object. In Java, objects are dynamically created. Hence, they don’t have names. They are referred using the name of their reference variable.<br />
<br />
In C++ :-<br />
Rectangle r;<br />
<br />
<div>
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpSuWZ4VlgJ3NBzkPOURQ-7xj9ZxYOKJoeQ3n4D8msU5mg4vTc8-Q_l9VjbQCcCzgl2_zObIunZBrUAs3QmyBkiPmGniJhvyqBr5V3tTTmXIp8VcNvuoB9pAMKIvCkgmVuqbBs0g20dMFR/s1600/uptuexam_core_java.png" /></div>
<br />
<br />
Traditionally in languages when we write statement<br />
int a=5, b=6, c=10;<br />
a table is created during compilation.<br />
<div>
<br /></div>
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; margin-left: 36.0pt; mso-border-alt: solid black .5pt; mso-border-insideh: .5pt solid black; mso-border-insidev: .5pt solid black; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Variable Name<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Type<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Address<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Value<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.9pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Scope<o:p></o:p></span></b></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">a<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">int<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">0 <span style="color: #76923c;">+ 1000<o:p></o:p></span></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">5<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.9pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">main<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">B<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">int<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">2 <span style="color: #76923c;">+ 1000</span><o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">6<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.9pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">main<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">c<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">int<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">4 <span style="color: #76923c;">+ 1000</span><o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.85pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">10<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 94.9pt;" valign="top" width="158"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">main<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
int * p;<br />
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left; text-indent: 36pt;">
<br /></div>
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitGzsVkscePcNoaE2dBDScF8N5oanQY_9Qx7zmOBiLEHiLP3z-sMZeC-VBMurOT486czuEfIj0q-f9p_Xu4h_SWgWILXiBai60EEoTyNHMlEP-ZDhz7fNSfG4diNV20QFliRs7yCLsKk_K/s1600/uptuexam_core_java.png" height="640" width="472" /><br />
<br />
<br />
<b>Address & Reference denotes two different things.</b><br />
o Address represents actual memory location whereas Reference represents a mechanism of finding out objects.<br />
Different JRE provides different implementations of references.<br />
o In Microsft JRE, References are implemented as pointers that is they actually holds the address of object.<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqCSCu0yGFpvenrjEFoWLzJGiAmKOPBzt-Dbg84X1bOMXxNhBPveOW6tn0290kHi67-u-Bt_yFpLN4uU6XdXBA2iwR-0Ftfm0s1UqjUHRNgZx7uwIWnrRIFcyyocsuLCKa3ZCmucheOJfm/s1600/uptuexam_core_java.png" /></div>
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJzCZcvSWxR_TA1YlCbpS-HqwjGp__VCnnVGFzS-3qGJunXqakkZQK7N4-whgA4JKgY5Anp0ClmEZxQdLX9C4VtCMIVZthkTfN7Aq2Yxh6FYFBXitOrsiZvTWIQffNMyAd8v8idyMQIMlf/s1600/uptuexam_core_java.png" height="324" width="640" /></div>
<br />
<br />
<br />
o In Sun Microsystem JRE, <b>Reference Variables </b>are implemented as pointer to pointer.<br />
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirFHg8Ow9ZG4aWqcA4119u8pWJ01OEYskRbvn-zy9JTq5lSYkJ0wvKjywWq5VRodf697rqSbF7tp4r2vYB5zhCzRaXHj4IIgSC7Pjt-fFz0pReEVmapw6cAscVOr8Q-fxAycRoFys3IrOX/s1600/uptuexam_core_java.png" height="175" width="320" /></div>
<br />
In this implementation, <b>Reference</b> and <b>Address</b> are different.<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglGPuB5mIqLPkwE2XFK8oJGk_zVJMaNpnqTe8zRH4heS-UvV3Wm7sJzyn8Hknnd-v_a-66lY6p_PE3OjvDpz764GYj8UxxGeXju8k_lbMto8FvxUyNaUVBCpJNQraiCWjSBaBkdPuJ_noT/s1600/uptuexam_core_java.png" height="306" width="640" /></div>
<br />
<br />
Now we will write a program <b>RectTest.java </b>to test the program <b>Rectangle.java </b>written above.<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">public class</span><span style="color: #006699;"> RectTest</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #990000;">public static void</span><span style="color: #006699;"> main(String[] args)</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>Rectangle r = new Rectangle();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>r.l = 5;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>r.b = 7;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>r.setDimension(5, 4);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("Dimension of rectangle r ");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>r.display();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("Area of r = " + r.area());</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<b>Output –</b><br />
<br />
<br />
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyN-HnuLbrcVtSNQmULfQ58xvrqsNaRGTziT3Ll4noilydKjHNsijkCUJSC30O1uY8CNcCSosQQhqBWpUVwFOcDRm0-1Fl-KzWoQ0kMk7C8qx2hSkj2iJ-EOpJYsxV4QzVZSM2gok9QuCl/s1600/uptuexam_core_java.png" height="232" width="640" /><br />
<br />
<br />
<br />
Since variables l and b are declared <b>private</b> so we cannot access it from outside.<br />
<br />
Now the same program <b>RectTest.java</b> again.<br />
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">PROGRAM</span><span style="color: #006699;"> RectTest.java</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class RectTest</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #990000;">public static void</span><span style="color: #006699;"> main(String[] args)</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>Rectangle r = new Rectangle();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>//r.l = 5; // Invalid statement</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>//r.b = 7; // Invalid statement</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>r.setDimension(5, 4);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("Dimension of rectangle r ");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>r.display();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("Area of r = " + r.area());</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<b>OUTPUT –</b><br />
<br />
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk2-hnNkBc6hVrYHp-WoF4F3ni8toK3yVvZF6mjzClf2VdKQ53bZIXvm8YnMrMvAUF5GKHntVgLLTr1VgtUM11EjxdH8NDK5YAN_2soPCIH_iBxxUgDoZV0dZKanGWrvk18EEb_h97Qpoc/s1600/uptuexam_core_java.png" height="260" width="320" /><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/what-is-datatype.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/constructor.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-11105764345366403732014-08-12T10:10:00.003-07:002014-08-14T10:41:42.313-07:00Question: What is datatype?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
Question: What is datatype?</h5>
<br />
<span style="color: blue; font-family: Georgia, Times New Roman, serif;"><b>Answer</b></span> – <span style="font-family: Georgia, Times New Roman, serif;">Datatype is a set of values that has an associated set of operations and a memory representation for its values.</span><br />
<br />
<br />
<table border="1" cellpadding="0" cellspacing="0" class="MsoNormalTable" style="border-collapse: collapse; border: none; mso-border-alt: solid black .5pt; mso-border-insideh: .5pt solid black; mso-border-insidev: .5pt solid black; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid black 1.0pt; mso-border-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-bidi-font-size: 10.0pt;">S.
NO.<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-bidi-font-size: 10.0pt;">DATA
TYPE<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-bidi-font-size: 10.0pt;">SIGN
IN BYTES<o:p></o:p></span></b></div>
</td>
<td style="border-left: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-bidi-font-size: 10.0pt;">DEFAULT
VALUES<o:p></o:p></span></b></div>
</td>
</tr>
<tr>
<td style="background: #262626; border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-themecolor: background1;">1.<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 10.0pt;">char<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">2<o:p></o:p></span></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">\0 (Null Character)<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="background: #262626; border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-themecolor: background1;">2.<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 10.0pt;">byte<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">1<o:p></o:p></span></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">0<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="background: #262626; border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-themecolor: background1;">3.<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 10.0pt;">short<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">2<o:p></o:p></span></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">0<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="background: #262626; border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-themecolor: background1;">4.<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 10.0pt;">int<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">4<o:p></o:p></span></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">0<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="background: #262626; border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-themecolor: background1;">5.<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 10.0pt;">long<o:p></o:p></span></b></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">8<o:p></o:p></span></div>
</td>
<td style="background: #262626; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: white; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold; mso-themecolor: background1;">0<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="background: #FABF8F; border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #0f243e; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">6.<o:p></o:p></span></div>
</td>
<td style="background: #FABF8F; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">float<o:p></o:p></span></b></div>
</td>
<td style="background: #FABF8F; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #0f243e; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">4<o:p></o:p></span></div>
</td>
<td style="background: #FABF8F; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #0f243e; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">0<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="background: #FABF8F; border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #0f243e; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">7.<o:p></o:p></span></div>
</td>
<td style="background: #FABF8F; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt;">double<o:p></o:p></span></b></div>
</td>
<td style="background: #FABF8F; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #0f243e; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">8<o:p></o:p></span></div>
</td>
<td style="background: #FABF8F; border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #0f243e; font-family: "Times New Roman","serif"; font-size: 9.0pt; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">0<o:p></o:p></span></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid black 1.0pt; mso-border-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.9pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">8.<o:p></o:p></span></b></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 68.0pt;" valign="top" width="113"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="color: #92d050; font-family: "Times New Roman","serif"; font-size: 10.0pt;">boolean<o:p></o:p></span></b></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 76.5pt;" valign="top" width="128"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #c00000; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Not defined<o:p></o:p></span></div>
</td>
<td style="border-bottom: solid black 1.0pt; border-left: none; border-right: solid black 1.0pt; border-top: none; mso-border-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; padding: 0cm 5.4pt 0cm 5.4pt; width: 130.5pt;" valign="top" width="218"><div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="color: #c00000; font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">false<o:p></o:p></span></div>
</td>
</tr>
</tbody></table>
<br />
<div class="MsoNormal">
<br /></div>
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">class </span><span style="color: #006699;">Test1</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #b45f06;">public static void </span><span style="color: #006699;">main(String args[])</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>int a;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #006699;">System.out.println("a = “ + a); </span><span style="color: #6aa84f;">// Compilation error</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<br />
<b>Output -</b><br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9dIcd1B8n18213Ybwkere_UTJlP7Ff0VErRJpN2QkMbHxftc-YV6L6iorgLoDW2clp4oXu9lMzmYCjEIirzwwikOgchiFBDkf4bareMyaKbiSO4uhdjwUu89hvtK4085ZyEKvAB_N1Ync/s1600/uptuexam_core_java.png" height="206" width="640" /></div>
<br />
<br />
<br />
<br />
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<b><span lang="EN-US" style="font-family: 'Times New Roman', serif;">Explanation</span></b><span lang="EN-US" style="font-family: 'Times New Roman', serif;">-<span style="font-size: x-small;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><br /></span></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><br /></span></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left; text-indent: -18pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 10.0pt; mso-bidi-font-family: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;">v<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Concept of default value is not applied on local
variables of method i.e. local variables of a method need to be explicitly
assigned.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<br /></div>
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left; text-indent: -18pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 10.0pt; mso-bidi-font-family: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;">v<span style="font-family: 'Times New Roman'; font-size: 7pt; line-height: normal;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Default value will be applied in class variables.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<br /></div>
<br />
<br />
<br />
<br />
<div class="MsoNormal" style="line-height: 10pt; margin: 0cm 0cm 0.0001pt 36pt; text-align: left;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Like for example the above program can be rewritten as-<o:p></o:p></span></div>
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">PROGRAM</span><span style="color: #006699;"> Test1.java</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>class Test1</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>static int a, b;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #990000;">public static void</span><span style="color: #006699;"> main(String args[])</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #006699;">System.out.println("a & b is : " + a + " " + b); </span><span style="color: #38761d;">// No compilation error</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<b>OUTPUT –</b><br />
<br />
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7NF0JpPmGj2kqNdZyJxMCALsBH5rU9rfLumDexEjQ8uoCGfQ054qdqY4NKWtSsy6FULZ30qnzpksqBb5UMnCDQX6BoqMwKzmofzlqAdBrZ-WnTYZEb3UDKq_WrXyDHPRFkG06FHIfZpyp/s1600/uptuexam_core_java.png" height="318" width="320" /><br />
<br />
<br />
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 550px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: red;">PROGRAM </span><span style="color: #006699;">Test2.java</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>class Test2</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b><span style="color: #990000;">public static void </span><span style="color: #006699;">main(String args[])</span></b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>float f = 12.45;</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("Value of f = " + f);</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;">What
will be the output –</span></span></b></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">A.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal;">
</span></span></b><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Value of f = 12.45<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">B.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal;">
</span></span></b><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Value of f = 12<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">C.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal; line-height: normal;">
</span></span></b><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt;">Value of f = 12.00000<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-fareast-font-family: "Times New Roman";">D.<span style="font-family: 'Times New Roman'; font-size: 7pt; font-weight: normal;">
</span></span></b><!--[endif]--><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape id="_x0000_s1026" style="height: 14.9pt; left: 0; margin-left: 147.6pt; margin-top: 1.2pt; position: absolute; text-align: left; width: 14.9pt; z-index: -1;" type="#_x0000_t75" wrapcoords="-635 0 -635 20965 21600 20965 21600 0 -635 0">
<v:imagedata o:title="" src="file:///E:\Users\Tinku\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"><span style="color: #6aa84f;">
<w:wrap type="tight">
</w:wrap></span></v:imagedata></v:shape><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Compilation Error <span style="color: blue;"> (</span></span><span style="color: blue;"><span style="text-align: left;"><span style="font-family: Times New Roman, serif; font-size: x-small;">output</span></span><span style="font-family: 'Times New Roman', serif; font-size: 10pt; text-indent: -18pt;">)</span></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">Now let’s see the output of the above program.<o:p></o:p></span></div>
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA2P6fa07DSp9RcwN9EkeMat88IzEFNS3UOMWP22cwhoq00r5icJp9rfYEkp7xWxEFl2j2cnnDjiqQpznmfGOQPsP8DekfyvCPQibCDP7Df5BYm8bEMN2R5RJ_GMkfZ9ATC__hrwPXHE1l/s1600/uptuexam_core_java.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA2P6fa07DSp9RcwN9EkeMat88IzEFNS3UOMWP22cwhoq00r5icJp9rfYEkp7xWxEFl2j2cnnDjiqQpznmfGOQPsP8DekfyvCPQibCDP7Df5BYm8bEMN2R5RJ_GMkfZ9ATC__hrwPXHE1l/s1600/uptuexam_core_java.png" height="232" width="640" /></a><br />
<br />
<br />
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><b>Explanation –</b><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><b><br /></b></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;">In Java, floating point constants are of double type by default. The
value of higher type cannot be directly assigned to a lower type. In such a
case type conversion is required.<o:p></o:p></span></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-29410679591254124722014-08-08T06:21:00.002-07:002014-08-14T10:41:53.743-07:00how to execute a program without main().<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/what-is-datatype.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
how to execute a program without main().</h5>
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 727.640625px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
</ol>
<b style="font-family: Verdana; font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><span style="color: blue;">PROGRAM First3.java</span></b><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px; text-align: left;"></ol>
<span style="color: #38761d; font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"> public class First3</b></span><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px; text-align: left;"></ol>
<span style="color: #38761d; font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"> {</b></span><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px; text-align: left;"></ol>
<span style="color: #38761d; font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"> static</b></span><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px; text-align: left;"></ol>
<span style="color: #38761d; font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"> {</b></span><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px; text-align: left;"></ol>
<span style="color: #38761d; font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"> System.out.println("It is executing without main()......");</b></span><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px; text-align: left;"></ol>
<span style="color: #38761d; font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"> System.exit(0);</b></span><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px; text-align: left;"></ol>
<span style="font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><span style="color: #38761d;"> } </span></b></span></div>
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 727.640625px;">
<span style="font-family: Arial, Helvetica, sans-serif;"><b style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><span style="color: #38761d;"> } </span></b></span><br />
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; font-family: Verdana; font-size: 13px; font-style: normal; font-variant: normal; line-height: 1.5; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><br /></li>
</ol>
</div>
</div>
<br />
Output –<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPdI_hf2s6z44QAfDS2yY0NrlY8dc8vwaRFNyQ2zX8JhS8TRyFGjjhFBbZfq1Bk3E8Db51PrVTQQ8FholRVlv0knZBKTu0gEI-EVb6W5dKIkvokL7XcyPVfCTqKkuhIMXquc6nq-ESYolp/s1600/uptuexam_core_java.png" height="282" width="640" /></div>
<br />
<br />
<br />
<br />
<br />
<br />
<div class="codeblock" style="-webkit-box-shadow: rgb(212, 212, 212) 8px 3px 10px; background: rgb(248, 248, 245); border: 1px solid rgb(213, 221, 198); box-shadow: rgb(212, 212, 212) 5px 3px 10px; margin: 5px 0px 10px; padding: 0px;">
<div class="dp-highlighter" style="margin: 8px 0px !important; overflow: auto; padding-top: 0px; width: 727.640625px;">
<ol class="dp-j" start="1" style="border: none; margin: 0px; padding: 0px;">
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #006699; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>PROGRAM :</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public class First</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public static void main()</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("It is overloaded main.....");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>static</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>main();</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>public static void main(String args[])</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>{</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>System.out.println("It is invoked by JRE");</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
<li class="alt" style="border: none; margin: 3px 0px 0px; padding: 0px 3px 0px 10px !important;"><span style="color: #38761d; font-family: Verdana;"><span style="font-size: 12.800000190734863px; line-height: 15.600000381469727px;"><b>}</b></span></span></li>
</ol>
</div>
</div>
<br />
<br />
Output –<br />
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrAQX_kV-iOElWeJ_rjP8po15QcU4wG9R38xhlCkSaQKRrOau_svNqQjXMV0kS_qboZ6e1KsY5v8nKCpbDn9qwGiWfOEsW-6YtsKyc8fIkkRG9tiikzZN9OL6Oe5iuSn8ryqyn3TODaWdg/s1600/uptuexam_core_java.png" height="362" width="640" /></div>
<br />
<br />
<br />
<br />
<br />
<br />
<span style="font-size: large;"><br /></span>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="font-size: large;">Signature of
Method –</span><span style="font-size: x-small;"><o:p></o:p></span></span></b></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="font-size: large;"><br /></span></span></b></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="font-size: large;"><br /></span></span></b></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;">modifier returnType methodName(Argument list)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;"><br /></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;">{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;"> -------------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;"> -------------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;"> ------------- <o:p></o:p></span></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;"><span style="color: blue;">}<o:p></o:p></span></span></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/what-is-datatype.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-9723854751032032122014-08-08T04:57:00.000-07:002014-08-14T10:42:05.730-07:00JVM, JRE & JDK<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
JVM, JRE & JDK</h5>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;">v<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">Format of class file.<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;">v<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">Class loading mechanism.<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-line-height-alt: 10.0pt; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: -18.0pt;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Wingdings; font-size: 10.0pt; mso-bidi-font-family: Wingdings; mso-bidi-font-weight: bold; mso-fareast-font-family: Wingdings;">v<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><!--[endif]--><span lang="EN-US" style="font-family: "Times New Roman","serif"; mso-bidi-font-size: 10.0pt; mso-bidi-font-weight: bold;">Memory Management etc.</span><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><o:p></o:p></span></div>
<br />
<br />
<b><span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 14.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-size: 10.0pt; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;">JVM</span></b><br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhU-l6PIu3jnf2xzwtZ6ts7UAe_IT-Ykv0-KJWetbmeNYrP-_SyTeQueB8CIlRzK4oVFkQmPrZViaZx2ZHAc8KHoFxxDQQ4z1Gp2E-sAjdUTJiDinDgbrJJTzqIVaQsSBUmWSHNdmzBex-i/s1600/uptuexam_core_java.png" /></div>
<br />
<br />
<br />
<b><span style="font-size: large;">JDK</span></b><br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: 0cm;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">In Java,
classes are packaged and distributed in jar format.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">Jar - Java Archive<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: 0cm;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">Sun
Microsystems provides classes of core java library through a jar file named
“rt.jar.<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; mso-list: l0 level1 lfo1; text-align: justify; text-autospace: none; text-indent: 0cm;">
<!--[if !supportLists]--><span lang="EN-US" style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; line-height: normal;">
</span></span><!--[endif]--><span lang="EN-US" style="font-family: 'Times New Roman', serif;">C:\NewJava>jar<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">jar -tf rt.jar<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">jar -tf rt.jar> a.txt<o:p></o:p></span></div>
<br />
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<b><u><span lang="EN-US" style="font-family: 'Times New Roman', serif;">To compress<o:p></o:p></span></u></b></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">jar -crf a.jar *<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">jar -tf a.jar (to see)<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: 'Times New Roman', serif;">jar -xf a.jar (to extract)<o:p></o:p></span></div>
<br />
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6V28ipfJralFsb2fw75ZWrgKrOAL9vJiz2rAeXWu-UD7KM2vetT-G5jQoEEU4jWjYRIOZ0uujf8Zehm5kZSRkvJH9uJx8AUX9pfRI9RpbI0tuSjZCSldssbWLrJij0KnLCnL15m_rahhy/s1600/uptuexam_core_java.png" height="360" width="640" /></div>
<br />
<br />
<br />
<span lang="EN-US" style="font-family: 'Times New Roman', serif; line-height: 115%;"><span style="font-size: large;"><b>The above program in modified form</b></span></span><br />
<br />
<br />
PROGRAM first2.java<br />
<br />
<span style="color: #6aa84f;">public class First2</span><br />
<span style="color: #6aa84f;">{</span><br />
<span style="color: #6aa84f;">public static void main()</span><br />
<span style="color: #6aa84f;">{</span><br />
<span style="color: #6aa84f;">System.out.println("It is overloaded main.....");</span><br />
<span style="color: #6aa84f;">}</span><br />
<span style="color: #6aa84f;">public static void main(String args[])</span><br />
<span style="color: #6aa84f;">{</span><br />
<span style="color: #6aa84f;">System.out.println("Invoked by JRE, invoking overloaded main......");</span><br />
<span style="color: #6aa84f;">main();</span><br />
<span style="color: #6aa84f;">}</span><br />
<span style="color: #6aa84f;">}</span><br />
<br />
<b>OUTPUT –</b><br />
<b><br /></b>
<br />
<div style="text-align: center;">
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWyVkjDt4CiHYWTs5Rm-sQn5KDYxQQLTXg9kmYBF50pJSWnVnV36sWAf7r04IdR7yDNP9NsLfexvwPHz5s1PVYiMpeS69VfKzYeN_pp3JSrwQgfkUTPIlWqc8ZCJGMjVGoumacIGqnaMLD/s1600/uptuexam_core_java.png" height="252" width="640" /></div>
<b><br /></b>
<b><br /></b>
<b><br /></b>
<br />
<br />
<br />
<br />
<br />
<br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0tag:blogger.com,1999:blog-8460824190662864058.post-55862740013319892652014-08-08T04:43:00.000-07:002014-08-14T10:42:16.810-07:00Question : Why command-line arguments?<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/static-keyword.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">next »</a></li>
</ul>
</div>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
Question : Why command-line arguments?</h5>
<br />
c:\>java Adder 10 20<br />
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;"><b>Command line argument</b></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;">Result is : 30</span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<br />
<h5 style="background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFbUPp0XscuE9IoHfVeSI6V06wgBncV8eVLHOfK8yvBPOV9gGbwWu6XETGHSuzY9-hnTsePL4RT7RW9RSObCOBQQ0vnB5y0JTg9WT1DjajduUdoG0_j5amEvkXCVR9YPeWsisQYLqu_z2s/s1600/page_head_bgaaaaaaaaa.gif); background-position: 50% 0%; background-repeat: repeat-x; border: 1px solid rgb(225, 226, 226); color: #990000; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 40px; margin: 0px; padding-left: 10px; width: 760px;">
Explanation of:</h5>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<br />
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;"><span style="color: blue;">[</span><span style="color: red;">System.out.println();</span><span style="color: blue;">]</span></span></span></div>
<span style="font-family: 'Times New Roman', serif; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<br />
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;"><b>System</b> – It is a pre-defined class in java.lang package</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;"><br /></span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;"><b>out</b> - it is a static variable inside System class of type PrintStream(class reference variable) (i.e.) static PrintStream out;</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;">and PrintStream is a predefined class in java.io package.</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;">Since it is static that’s why we are calling</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;"> System.out</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;">So, System.out means we are getting the reference to the object of type PrintStream</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;"><br /></span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;">println()– It is the method in PrintStream class for Standard output stream.</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;">So to access println method , we need PrintStream object which we are getting through System.out.</span></span></div>
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px; text-align: justify; text-indent: 36pt;"></span></span><br />
<div style="text-align: justify; text-indent: 48px;">
<span style="font-family: Times New Roman, serif;"><span style="line-height: 13.333333015441895px;"> So finally its System.out.println---- to produce standard output Stream.</span></span></div>
<div style="text-align: justify; text-indent: 48px;">
<br /></div>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">class PrintStream<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;"> public void
print(String s)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;"> -----------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;"> -----------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;"> -----------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">}<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<br /></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">public void println(String s)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;"> -----------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;"> -----------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;"> -----------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">}<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">-------------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">-------------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">}<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;"><span style="color: #6aa84f;"> class System</span></span><br />
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;"><span style="color: #6aa84f;"> {</span></span><br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">public static PrintStream out;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">-------------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">-------------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none; text-indent: 36.0pt;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">-------------<o:p></o:p></span></span></div>
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; mso-bidi-font-weight: bold;"><span style="color: #6aa84f;">}<o:p></o:p></span></span></div>
<span lang="EN-US" style="font-family: "Times New Roman","serif"; font-size: 10.0pt; line-height: 115%; mso-ansi-language: EN-US; mso-bidi-font-weight: bold; mso-bidi-language: AR-SA; mso-fareast-font-family: Calibri; mso-fareast-language: EN-US;"><span style="color: #6aa84f;">
</span></span><br />
<div class="MsoNormal" style="line-height: 10.0pt; margin-bottom: .0001pt; margin-bottom: 0cm; margin-left: 36.0pt; margin-right: 0cm; margin-top: 0cm; mso-layout-grid-align: none; text-align: justify; text-autospace: none;">
<br /></div>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span>
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"><br /></span><br />
<span style="font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 10pt; text-align: justify; text-indent: 36pt;"></span><br />
<style type="text/css">
.pagination{
padding: 2px;
}
.pagination ul{
margin: 0;
padding: 0;
text-align: left; /*Set to "right" to right align pagination interface*/
font-size: 18px;
}
.pagination li{
list-style-type: none;
display: inline;
padding-bottom: 1px;
}
.pagination a, .pagination a:visited{
padding: 0 5px;
border: 1px solid #9aafe5;
text-decoration: none;
color: #2e6ab1;
}
.pagination a:hover, .pagination a:active{
border: 1px solid #2b66a5;
color: white;
background-color: green;
}
.pagination a.currentpage{
background-color: #2e6ab1;
color: #FFF !important;
border-color: #2b66a5;
font-weight: bold;
cursor: default;
}
.pagination a.disablelink, .pagination a.disablelink:hover{
background-color: white;
cursor: default;
color: #929292;
border-color: #929292;
font-weight: normal !important;
}
.pagination a.prevnext{
font-weight: bold;
}
</style>
<br />
<div class="pagination">
<ul>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/static-keyword.html">« previous</a></li>
<li><a href="http://www.uptuexam.com/2014/08/basics-of-core-java.html">1</a></li>
<li><a href="http://www.uptuexam.com/2014/08/history-of-java.html">2</a></li>
<li><a href="http://www.uptuexam.com/2014/08/features-of-java.html">3</a></li>
<li><a href="http://www.uptuexam.com/2014/08/internet-programming.html">4</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-java-virtual-machine.html">5</a></li>
<li><a href="http://www.uptuexam.com/2014/08/hello-java-example.html">6</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword.html">7</a></li>
<li><a class="currentpage" href="http://www.uptuexam.com/2014/08/question-why-command-line-arguments.html">8</a></li>
<li><a href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">9</a></li>
<li><a href="http://www.uptuexam.com/2014/08/how-to-execute-program-without-main.html">10</a></li>
<li><a href="http://www.uptuexam.com/2014/08/what-is-datatype.html">11</a></li>
<li><a href="http://www.uptuexam.com/2014/08/type-casting-type-conversion.html">12</a></li>
<li><a href="http://www.uptuexam.com/2014/08/constructor.html">13</a></li>
<li><a href="http://www.uptuexam.com/2014/08/anonymous-block.html">14</a></li>
<li><a href="http://www.uptuexam.com/2014/08/static-keyword_14.html">15</a></li>
<li><a href="http://www.uptuexam.com/2014/08/at-time-of-class-loading-following.html">16</a></li>
<li><a href="http://www.uptuexam.com/2014/08/limitations-of-static-methods-static.html">17</a></li>
<li><a class="prevnext" href="http://www.uptuexam.com/2014/08/jvm-jre-jdk.html">next »</a></li>
</ul>
</div>
</div>
abhihttp://www.blogger.com/profile/06345647892348623591noreply@blogger.com0