<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4113655829883004086</id><updated>2024-12-18T19:17:02.265-08:00</updated><category term="JAVA"/><category term="Class"/><category term="Object"/><category term="Package"/><category term="XML"/><category term="Activity"/><category term="Actor"/><category term="ArrayList"/><category term="Cairngorm"/><category term="Collection"/><category term="Component"/><category term="Container"/><category term="DOM"/><category term="DTD"/><category term="Deployment"/><category term="Encapsulation"/><category term="Enumeration"/><category term="Event Flow"/><category term="Generics"/><category term="HTML"/><category term="HTTP"/><category term="HashMap"/><category term="Inheritance"/><category term="Iterator"/><category term="JDK"/><category term="JUnit"/><category term="Map"/><category term="MySQL"/><category term="OOPS"/><category term="Polymorphism"/><category term="RPC"/><category term="Release Date"/><category term="SAX"/><category term="SQL"/><category term="SQL Server"/><category term="Schema"/><category term="Set"/><category term="State"/><category term="Stored Procedures"/><category term="Testing"/><category term="UDDI"/><category term="UML"/><category term="Use Case"/><category term="Vector"/><category term="Web Services"/><category term="WebLogic"/><category term="WebServer"/><category term="WebSphere"/><category term="XSL"/><category term="XSLT"/><category term="compareTo"/><category term="toString"/><title type='text'>Java Interview Answers</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://java-interview-answers.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-9216616845104529737</id><published>2019-06-30T22:18:00.004-07:00</published><updated>2019-06-30T22:18:55.733-07:00</updated><title type='text'>Sort Algorithms</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Quick Sort&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/RNpBjijkjYY/0.jpg&quot; src=&quot;https://www.youtube.com/embed/RNpBjijkjYY?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Insertion Sort&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/kpN-tuFqrVk/0.jpg&quot; src=&quot;https://www.youtube.com/embed/kpN-tuFqrVk?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Merge Sort&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/658aoUY4TW0/0.jpg&quot; src=&quot;https://www.youtube.com/embed/658aoUY4TW0?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/9216616845104529737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/9216616845104529737'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2019/06/sort-algorithms.html' title='Sort Algorithms'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/RNpBjijkjYY/default.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-6191054125061924709</id><published>2019-06-30T22:10:00.000-07:00</published><updated>2019-06-30T22:10:13.086-07:00</updated><title type='text'>Search Algorithms</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Linear Search&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/liTdX1KTWcU/0.jpg&quot; src=&quot;https://www.youtube.com/embed/liTdX1KTWcU?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Binary Search&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/1HIFzve0zCM/0.jpg&quot; src=&quot;https://www.youtube.com/embed/1HIFzve0zCM?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Breadth First Search&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/ALt3VXC2gtU/0.jpg&quot; src=&quot;https://www.youtube.com/embed/ALt3VXC2gtU?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;Depth First Search&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe width=&quot;320&quot; height=&quot;266&quot; class=&quot;YOUTUBE-iframe-video&quot; data-thumbnail-src=&quot;https://i.ytimg.com/vi/9XsGl7cMGD4/0.jpg&quot; src=&quot;https://www.youtube.com/embed/9XsGl7cMGD4?feature=player_embedded&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/6191054125061924709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/6191054125061924709'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2019/06/search-algorithms.html' title='Search Algorithms'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/liTdX1KTWcU/default.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-2627847191193551361</id><published>2010-05-31T11:41:00.001-07:00</published><updated>2010-05-31T11:41:04.676-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><title type='text'>JAVA</title><content type='html'>&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary of Oracle Corporation) and released in 1995 as a core component of Sun Microsystems&#39; Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHYIhBviLucDEcm5Rk3w3NqM4_HKmNCPyneaHgN6z05hiuUpwzMXGm0YPXskP_yMen-qQF-f7vjnoLx6pr5INCvCF48kpzsKxPxvFhWSTf6krFS7V67eCBvrUYM4Bo-1nJue12AP9eYkk/s1600/java+h.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHYIhBviLucDEcm5Rk3w3NqM4_HKmNCPyneaHgN6z05hiuUpwzMXGm0YPXskP_yMen-qQF-f7vjnoLx6pr5INCvCF48kpzsKxPxvFhWSTf6krFS7V67eCBvrUYM4Bo-1nJue12AP9eYkk/s320/java+h.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, and object-oriented, and is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers &quot;write once, run anywhere&quot;. Java is considered by many as one of the most influential programming languages of the 20th century, and is widely used from application software to web applications.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;James Gosling initiated the Java language project in June 1991 for use in one of his many set-top box projects. the language, initially called Oak after an oak tree that stood outside Gosling&#39;s office, also went by the name Green and ended up later renamed as Java, from a list of random words. Gosling aimed to implement a virtual machine and a language that had a familiar C/C++ style of notation.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Sun Microsystems released the first public implementation as Java 1.0 in 1995. It promised &quot;Write Once, Run Anywhere&quot; (WORA), providing no-cost run-times on popular platforms. Fairly secure and featuring configurable security, it allowed network- and file-access restrictions. Major web browsers soon incorporated the ability to run Java applets within web pages, and Java quickly became popular. With the advent of Java 2 (released initially as J2SE 1.2 in December 1998), new versions had multiple configurations built for different types of platforms. For example, J2EE targeted enterprise applications and the greatly stripped-down version J2ME for mobile applications (Mobile Java). J2SE designated the Standard Edition. In 2006, for marketing purposes, Sun renamed new J2 versions as Java EE, Java ME, and Java SE, respectively.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;In 1997, Sun Microsystems approached the ISO/IEC JTC1 standards body and later the Ecma International to formalize Java, but it soon withdrew from the process.Java remains a de facto standard, controlled through the Java Community Process. At one time, Sun made most of its Java implementations available without charge, despite their proprietary software status. Sun generated revenue from Java through the selling of licenses for specialized products such as the Java Enterprise System. Sun distinguishes between its Software Development Kit (SDK) and Runtime Environment (JRE) (a subset of the SDK); the primary distinction involves the JRE&#39;s lack of the compiler, utility programs, and header files.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;On November 13, 2006, Sun released much of Java as open source software under the terms of the GNU General Public License (GPL). On May 8, 2007, Sun finished the process, making all of Java&#39;s core code available under free software/open-source distribution terms, aside from a small portion of code to which Sun did not hold the copyright.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;There were five primary goals in the creation of the Java language:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;It should be &quot;simple, object oriented, and familiar&quot;.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;It should be &quot;robust and secure&quot;.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;It should be &quot;architecture neutral and portable&quot;.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;It should execute with &quot;high performance&quot;.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;It should be &quot;interpreted, threaded, and dynamic&quot;.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;Sun has defined and supports four editions of Java targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are:&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;Java Card for smartcards.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;Java Platform, Micro Edition (Java ME) — targeting environments with limited resources.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;Java Platform, Standard Edition (Java SE) — targeting workstation environments.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;Java Platform, Enterprise Edition (Java EE) — targeting large distributed enterprise or Internet environments.&lt;/i&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/2627847191193551361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/2627847191193551361'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/java_31.html' title='JAVA'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHYIhBviLucDEcm5Rk3w3NqM4_HKmNCPyneaHgN6z05hiuUpwzMXGm0YPXskP_yMen-qQF-f7vjnoLx6pr5INCvCF48kpzsKxPxvFhWSTf6krFS7V67eCBvrUYM4Bo-1nJue12AP9eYkk/s72-c/java+h.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-2765502921154081694</id><published>2010-05-31T11:38:00.000-07:00</published><updated>2010-05-31T11:38:20.811-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cairngorm"/><category scheme="http://www.blogger.com/atom/ns#" term="Event Flow"/><title type='text'>Flex Cairngorm</title><content type='html'>Cairngorm is one of the primary open source frameworks for application architecture in Adobe Flex. It was developed by iteration::two, who was acquired byMacromedia in 2005. It is part of the Adobe Engagement Platform.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;Cairngorm is based on the MVC model. It is specifically designed to facilitate complex state and data synchronization between the client and the server, while keeping the programming of the View layer detached from the data implementation.&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;The role of the View layer in a Cairngorm application is to throw events and bind to data stored in the Model. Components on the View can bind to Value Objects or other properties in the Model (data) layer.&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;In a Cairngorm Model, related data are stored in Value Objects (VOs), while simple variables can be stored as direct properties of the ModelLocator class. A static reference to the ModelLocator singleton instance is used by the View layers to locate the required data.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;The Controller is the most sophisticated part of the Cairngorm architecture.&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Controller layer is implemented as a singleton FrontController. The FrontController instance, which receives every View-generated event, dispatches the events to the assigned Command class based on the event&#39;s declared typ&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;e.&lt;br /&gt;
&lt;br /&gt;
The Command class then processes the event by running the Command class&#39; execute() method, which is an ICommand interface method. The event object may include additional data if required by the developer. The execute() method can update the central Model, as well as invoke a Service class which typically involves communication with a remote server. The IResponder interface, which is also implemented by the Command class, includes onResult and onFault methods to handle responses returned from the invoked remote service.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Organizing a Cairngorm Project&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;One of the tasks involved with any project is organization. When working with other developers, this becomes extremely important. Normally a Cairngorm project is organized in the following manner:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;There is a Main.mxml file that is the main application file for the Cairngorm application.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The project files are contained in a folder that uses &quot;reverse-dns&quot; format. For example, if the project was named CairngormSample, I would use the following folders net/CairngormSample .&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Within the CairngormSample directory, there will be the following folders:&lt;/span&gt;&lt;/li&gt;
&lt;ul type=&quot;circle&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;events/&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- This directory holds all of the custom events for the application&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;control/&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- This directory houses the FrontController for the application&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;commands/&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- This directory contains the Commands that are called by the FrontController&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;model/&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- The ModelLocator is contained in this folder (and other classes related to the model)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;view/&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- The components of the view are contained in this directory&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;By following this standard, you can know where to find any class that you may need in your Cairngorm application. Figure 1 illustrates this project structure.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;It also is a good development process to have a standard organizational structure for your projects - even if you are not using Cairngorm.&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #333333; font-size: 13px; margin-bottom: 1em; margin-left: auto; margin-right: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; width: auto;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 12px; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.4em; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: middle;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPe4arJP7qpBJxAxO4B2BjJ1whkJDiIMXdTong0zajqAL01IM056dRWYwhkVqyIG2pvPLozVdjltaj-Z0oHfrYQ9_QQBCdjI169PtB2QUFkf6zgBSZyRKutRcLgRurzNWGvTU8JygS2KA/s400/Cairngorm+Flow.jpg&quot; style=&quot;border-color: initial; border-color: initial; border-color: initial; border-color: initial; border-style: initial; border-style: initial; border-top-style: none; border-width: initial; border-width: initial; margin-left: auto; margin-right: auto;&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 10px; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.4em; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: middle;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Figure 1&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: x-large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;- Cairngorm Project Structure&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #292929; font-weight: bold; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Service to Worker Pattern&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Service to Worker pattern is the hardest for most people to grasp. It encompasses most of the logic for a Cairngorm application. To understand this pattern, you will need to understand some of the classes that are included with Cairngorm and their respective purposes.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CairngormEvent&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: windowtext;&quot;&gt;&lt;a href=&quot;http://www.davidtucker.net/docs/cairngorm/com/adobe/cairngorm/control/CairngormEvent.html&quot; style=&quot;color: #3366cc; font-weight: bold;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #c41919;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Reference&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;] - CairngormEvent is central in this pattern. It extends from Event. For your event to be handled properly in Cairngorm, it will need to be of type CairngormEvent.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CairngormEventDispatcher&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: windowtext;&quot;&gt;&lt;a href=&quot;http://www.davidtucker.net/docs/cairngorm/com/adobe/cairngorm/control/CairngormEventDispatcher.html&quot; style=&quot;color: #3366cc; font-weight: bold;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #c41919;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Reference&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;] - CairngormEventDispatcher actually dispatches the CairngormEvents. It is a singleton (just like the ModelLocator). In previous Cairngorm versions, you would call this class regularly, but now CairngormEvents can dispatch themselves (via the method dispatch). This method is simply a wrapper for the CairngormEventDispatcher, so even if you don&#39;t actually import and call the class, it is still central to the Service to Worker pattern in Cairngorm.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;FrontController&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: windowtext;&quot;&gt;&lt;a href=&quot;http://www.davidtucker.net/docs/cairngorm/com/adobe/cairngorm/control/FrontController.html&quot; style=&quot;color: #3366cc; font-weight: bold;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #c41919;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Reference&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;] - The FrontController maps a CairngormEvent to a Command.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;ICommand&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;[&lt;/span&gt;&lt;span style=&quot;color: windowtext;&quot;&gt;&lt;a href=&quot;http://www.davidtucker.net/docs/cairngorm/com/adobe/cairngorm/commands/ICommand.html&quot; style=&quot;color: #3366cc; font-weight: bold;&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;color: #c41919;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Reference&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;] - For a Command to function properly in Cairngorm, it needs to implement the ICommand interface. This interface requires that a command have a method named&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;execute&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;and that it accept the CairngormEvent that is mapped to it as an argument.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Cairngorm Event Flow&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The way that these classes interact is the&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Cairngorm Event Flow&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;. Figure 2 illustrates this entire process. While this process seems lengthy, it follows a logical order.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #333333; font-size: 13px; margin-bottom: 1em; margin-left: auto; margin-right: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; width: auto;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 12px; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.4em; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: middle;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJvSPJNx37VWSLAYHwNK17-wE0bkdfbfx9VEDwC2e68zjbg5k4aNBlAfqY2l9uThnwDJo3AGLNV7BVlP9nsnZ_XNypwodhtgi-tV_toqM2UCRdOJzGJxzLKF43CjB61OTWMLtFFtFnbpc/s1600/flow.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #3366cc; font-weight: bold; margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJvSPJNx37VWSLAYHwNK17-wE0bkdfbfx9VEDwC2e68zjbg5k4aNBlAfqY2l9uThnwDJo3AGLNV7BVlP9nsnZ_XNypwodhtgi-tV_toqM2UCRdOJzGJxzLKF43CjB61OTWMLtFFtFnbpc/s400/flow.jpg&quot; style=&quot;border-color: initial; border-color: initial; border-color: initial; border-color: initial; border-style: initial; border-style: initial; border-top-style: none; border-width: initial; border-width: initial;&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 10px; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.4em; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: middle;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Figure 2&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;- Cairngorm Basic Event Flow&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;For example, assume that&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Figure 2&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;shows what happens when a user clicks a login button. It would follow the following steps:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The user is viewing a component that has a login button.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;When the button is clicked, that component would dispatch an event named LoginEvent that extends CairngormEvent.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;3.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The FrontController would receive the LoginEvent and execute the command that is mapped to that event. For this example, it will be named LoginCommand and will implement ICommand.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;4.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Command is executed and received the LoginEvent as an argument. The LoginCommand will change the workflowState value in the ModelLocator.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;5.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The ModelLocator will have a predefined constant for the &quot;Logged in View&quot;. The command will change workflowState to this value.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;6.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Since the view is bound to workflowState, it will automatically update itself to the new view.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;color: #292929; line-height: 14px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Once these items are understood, the next most important thing to understand about Cairngorm is:&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929; line-height: 14px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Everything Should Be Mapped to an Event&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929; line-height: 14px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;. This is a drastic over-simplification, but it holds true in most situations. When a user clicks a login button - it should dispatch a CairngormEvent. When the user selects an option to change the view - it should dispatch a CairngormEvent. When a user submits a form to be stored on in a database - the form should dispatch a CairngormEvent. The dispatching of a CairngormEvent sets everything in motion.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span id=&quot;goog_134584038&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span id=&quot;goog_134584039&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Organizing Your Cairngorm Project&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;(With Server Interaction)&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;In the last section you saw the standard Cairngorm structure for a project. To complete this structure, you will need to add an additional two folders:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/business&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- This folder typically contains two types of files: the ServiceLocator (named Services.mxml) and Business Delegates.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;color: #292929; line-height: 24pt;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/vo&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;- This folder contains the value objects that are passed to and from the server.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Understanding the Process&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Before you begin crafting the server interaction for your project, you need to understand the full Service to Worker pattern. Figure 3 illustrates the entire process.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #333333; font-size: 13px; margin-bottom: 1em; margin-left: auto; margin-right: auto; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px; text-align: center; width: auto;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 12px; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.4em; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: middle;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNQLxb1e-DBmSJae_rWNng0vzsX-SW3e6djdg9IWrJ44JO5H_Ykqn9aJ3DTtfH70cPT7vsOzfhrrI6kbD-HGQY9fBs0C3NjmoMowFuELR4DTak7wHxg56MTK85rdh8vuXC5ed2a3TEOI4/s1600/flow+server.jpg&quot; imageanchor=&quot;1&quot; style=&quot;color: #3366cc; font-weight: bold; margin-left: auto; margin-right: auto;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNQLxb1e-DBmSJae_rWNng0vzsX-SW3e6djdg9IWrJ44JO5H_Ykqn9aJ3DTtfH70cPT7vsOzfhrrI6kbD-HGQY9fBs0C3NjmoMowFuELR4DTak7wHxg56MTK85rdh8vuXC5ed2a3TEOI4/s400/flow+server.jpg&quot; style=&quot;border-color: initial; border-color: initial; border-color: initial; border-color: initial; border-style: initial; border-style: initial; border-top-style: none; border-width: initial; border-width: initial;&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 10px; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.4em; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center; vertical-align: middle;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Figure 3&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;- Cairngorm Event Flow with Server Interaction&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #292929;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Phase I&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;- Execution Phase&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The user is viewing a component that has a login button. When the button is clicked, that component would dispatch an event named LoginEvent that extends CairngormEvent.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The FrontController would receive the LoginEvent and execute the command that is mapped to that event. For this example, it will be named LoginCommand and will implement ICommand.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;3.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Command is executed and received the LoginEvent as an argument. The LoginCommand creates an instance of the Delegate while passing a reference to the Responder. The Command then calls the specified method on the Delegate.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;4.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Delegate gets the service from the ServiceLocator and calls the method on the specific service.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;5.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The service defined in the ServiceLocator receives the information that is passed to it from the call in the Delegate.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Phase II&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;- Application Tier Processing&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Phase III&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;- Response Phase&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The service that is defined in the ServiceLocator returns the result of the server-side processing.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;2.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Delegate receives the result and passes it to the specified responder.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;3.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The Responder receives the result indicating a successful login.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;4.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The ModelLocator will have a predefined constant for the &quot;Logged in View&quot;. The Responder will change workflowState to this value.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 24pt; margin-left: 0.5in; text-indent: -0.25in;&quot;&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;5.&lt;/span&gt;&lt;span style=&quot;font: normal normal normal 7pt/normal &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Since the view is bound to workflowState, it will automatically update itself to the new view.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Note:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #292929;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Traditionally the Command and Responder were the same class in a Cairngorm application. If you are working with other developers, the applications will probably be coded in this manner. However, most developers (including Adobe Consulting) are now separating these classes into two different classes. For a less complex project, it might not make sense to separate these items, but in a large application it could prove advantageous in organization and practice to have two different classes.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #292929; font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 15pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #292929; font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #cc0000; font-size: small; font-style: italic; line-height: normal;&quot;&gt;Coming soon: Cairngorm Videos below made by David Tucker, an expert on the subject!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/2765502921154081694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/2765502921154081694'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/flex-cairngorm.html' title='Flex Cairngorm'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPe4arJP7qpBJxAxO4B2BjJ1whkJDiIMXdTong0zajqAL01IM056dRWYwhkVqyIG2pvPLozVdjltaj-Z0oHfrYQ9_QQBCdjI169PtB2QUFkf6zgBSZyRKutRcLgRurzNWGvTU8JygS2KA/s72-c/Cairngorm+Flow.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-7669494478924390460</id><published>2010-05-30T20:42:00.001-07:00</published><updated>2021-08-06T06:23:20.917-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Activity"/><category scheme="http://www.blogger.com/atom/ns#" term="Actor"/><category scheme="http://www.blogger.com/atom/ns#" term="Class"/><category scheme="http://www.blogger.com/atom/ns#" term="Component"/><category scheme="http://www.blogger.com/atom/ns#" term="Deployment"/><category scheme="http://www.blogger.com/atom/ns#" term="Object"/><category scheme="http://www.blogger.com/atom/ns#" term="Package"/><category scheme="http://www.blogger.com/atom/ns#" term="State"/><category scheme="http://www.blogger.com/atom/ns#" term="UML"/><category scheme="http://www.blogger.com/atom/ns#" term="Use Case"/><title type='text'>UML</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; face=&quot;sans-serif&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;Unified Modeling Language (UML) is a standardized general-purpose modeling languagein the field of software engineering. The standard is managed, and was created by, theObject Management Group.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;UML includes a set of graphic notation techniques to create visual models of software-intensive systems.&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;The Unified Modeling Language (UML) is used to specify, visualize, modify, construct and document the artifacts of an object-oriented software intensive system under development. UML offers a standard way to visualize a system&#39;s architectural blueprints, including elements such as:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;;&quot;&gt;&lt;ul&gt;&lt;li&gt;actors&lt;/li&gt;
&lt;li&gt;business processes&lt;/li&gt;
&lt;li&gt;(logical) components&lt;/li&gt;
&lt;li&gt;activities&lt;/li&gt;
&lt;li&gt;programming language statements&lt;/li&gt;
&lt;li&gt;database schemas, and&lt;/li&gt;
&lt;li&gt;reusable software components.&lt;/li&gt;
&lt;/ul&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; line-height: 10px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; line-height: 10px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 11px; line-height: 10px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 19px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;UML diagrams represent two different views of a system model:&lt;/div&gt;&lt;ul style=&quot;line-height: 1.5em; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; margin: 0.3em 0px 0.5em 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;Static (or&amp;nbsp;&lt;i&gt;structural&lt;/i&gt;) view: Emphasizes the static structure of the system using objects, attributes, operations and relationships. The structural view includes&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Class_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Class diagram&quot;&gt;class diagrams&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Composite_structure_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Composite structure diagram&quot;&gt;composite structure diagrams&lt;/a&gt;.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;Dynamic (or&amp;nbsp;&lt;i&gt;behavioral&lt;/i&gt;) view: Emphasizes the dynamic behaviour of the system by showing collaborations among objects and changes to the internal states of objects. This view includes&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Sequence_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Sequence diagram&quot;&gt;sequence diagrams&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Activity_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Activity diagram&quot;&gt;activity diagrams&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/UML_state_machine&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;UML state machine&quot;&gt;state machine diagrams&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;UML models can be exchanged among&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/UML_tool&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;UML tool&quot;&gt;UML tools&lt;/a&gt;&amp;nbsp;by using the&amp;nbsp;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://en.wikipedia.org/wiki/XMI&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;XMI&quot;&gt;XMI&lt;/a&gt;&amp;nbsp;interchange format.&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;&lt;/div&gt;&lt;h3 style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; border-bottom: none; color: black; font-size: 17px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Diagrams_overview&quot;&gt;Diagrams overview&lt;/span&gt;&lt;/h3&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;UML 2.2 has 14 types of&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Category:UML_diagrams&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Category:UML diagrams&quot;&gt;diagrams&lt;/a&gt;&amp;nbsp;divided into two categories.&lt;sup class=&quot;reference&quot; id=&quot;cite_ref-9&quot; style=&quot;font-style: normal; font-weight: normal; line-height: 1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Unified_Modeling_Language#cite_note-9&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none; white-space: nowrap;&quot;&gt;[10]&lt;/a&gt;&lt;/sup&gt;&amp;nbsp;Seven diagram types represent&amp;nbsp;&lt;i&gt;structural&lt;/i&gt;&amp;nbsp;information, and the other seven represent general types of&lt;i&gt;behavior&lt;/i&gt;, including four that represent different aspects of&amp;nbsp;&lt;i&gt;interactions&lt;/i&gt;. These diagrams can be categorized hierarchically as shown in the following&amp;nbsp;&lt;a href=&quot;http://en.wikipedia.org/wiki/Class_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Class diagram&quot;&gt;class diagram&lt;/a&gt;:&lt;img alt=&quot;Hierarchy of UML 2.2 Diagrams, shown as a class diagram&quot; height=&quot;212&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/d/d6/Uml_diagram2.png&quot; style=&quot;border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; margin-left: auto; margin-right: auto; vertical-align: middle;&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;&lt;div class=&quot;center&quot; style=&quot;text-align: center; width: 974px;&quot;&gt;&lt;div class=&quot;floatnone&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;UML does not restrict UML element types to a certain diagram type. In general, every UML element may appear on almost all types of diagrams; this flexibility has been partially restricted in UML 2.0. UML&amp;nbsp;profiles&amp;nbsp;may define additional diagram types or extend existing diagrams with additional notations.&lt;/div&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;In keeping with the tradition of engineering drawings, a comment or note explaining usage, constraint, or intent is allowed in a UML diagram.&lt;/div&gt;&lt;h4 style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; border-bottom: none; color: black; font-size: 15px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Structure_diagrams&quot;&gt;Structure diagrams&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Structure diagrams emphasize what things must be in the system being modeled:&lt;/div&gt;&lt;ul style=&quot;line-height: 1.5em; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; margin: 0.3em 0px 0.5em 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Class_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Class diagram&quot;&gt;Class diagram&lt;/a&gt;: the class diagrams describes the structure of a system by showing the system&#39;s classes, their attributes, and the relationships among the classes.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Component_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Component diagram&quot;&gt;Component diagram&lt;/a&gt;: depicts how a software system is split up into components and shows the dependencies among these components.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Composite_structure_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Composite structure diagram&quot;&gt;Composite structure diagram&lt;/a&gt;: describes the internal structure of a class and the collaborations that this structure makes possible.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Deployment_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Deployment diagram&quot;&gt;Deployment diagram&lt;/a&gt;: serves to model the hardware used in system implementations, and the execution environments and artifacts deployed on the hardware.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Object_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Object diagram&quot;&gt;Object diagram&lt;/a&gt;: shows a complete or partial view of the structure of a modeled system at a specific time.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Package_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Package diagram&quot;&gt;Package diagram&lt;/a&gt;: depicts how a system is split up into logical groupings by showing the dependencies among these groupings.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;Profile diagram: operates at the metamodel level to show stereotypes as classes with the &amp;lt;&lt;stereotype&gt;&amp;gt; stereotype, and profiles as packages with the &amp;lt;&lt;profile&gt;&amp;gt; stereotype. The extension relation (solid line with closed, filled arrowhead) indicates what metamodel element a given stereotype is extending.&lt;/profile&gt;&lt;/stereotype&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;gallery&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-style: solid; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-width: 1px; color: black; font-size: 13px; margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding: 2px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;vertical-align: top;&quot;&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 41px; padding-left: 0px; padding-right: 0px; padding-top: 41px; padding: 41px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:BankAccount.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;64&quot; src=&quot;http://upload.wikimedia.org/wikipedia/en/thumb/c/c9/BankAccount.png/120px-BankAccount.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Class diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 38px; padding-left: 0px; padding-right: 0px; padding-top: 38px; padding: 38px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Component-4.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;70&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/7/74/Component-4.png/120px-Component-4.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Component diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 54px; padding-left: 0px; padding-right: 0px; padding-top: 54px; padding: 54px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Composite_Structure_Diagram.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;37&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Composite_Structure_Diagram.png/120px-Composite_Structure_Diagram.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Composite structure diagrams&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 26px; padding-left: 0px; padding-right: 0px; padding-top: 26px; padding: 26px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:UML_Diagramme_Deploiement.gif&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;93&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/a/a8/UML_Diagramme_Deploiement.gif/120px-UML_Diagramme_Deploiement.gif&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Deployment diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr style=&quot;vertical-align: top;&quot;&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 55px; padding-left: 0px; padding-right: 0px; padding-top: 55px; padding: 55px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Instance_specification_3.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;35&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/8/89/Instance_specification_3.png/120px-Instance_specification_3.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Object diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 38px; padding-left: 0px; padding-right: 0px; padding-top: 38px; padding: 38px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Package_import-1.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;69&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/8/86/Package_import-1.png/120px-Package_import-1.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Package diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Since structure diagrams represent the structure they are used extensively in documenting the&amp;nbsp;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://en.wikipedia.org/wiki/Software_Architecture&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Software Architecture&quot;&gt;architecture&lt;/a&gt;&amp;nbsp;of software systems.&lt;/div&gt;&lt;h4 style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; border-bottom: none; color: black; font-size: 15px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Behavior_diagrams&quot;&gt;Behavior diagrams&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Behavior diagrams emphasize what must happen in the system being modeled:&lt;/div&gt;&lt;ul style=&quot;line-height: 1.5em; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; margin: 0.3em 0px 0.5em 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Activity_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Activity diagram&quot;&gt;Activity diagram&lt;/a&gt;: represents the business and operational step-by-step workflows of components in a system. An activity diagram shows the overall flow of control.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/UML_state_machine&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;UML state machine&quot;&gt;State machine&lt;/a&gt;&amp;nbsp;diagram: standardized notation to describe many systems, from computer programs to business processes.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Use_case_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Use case diagram&quot;&gt;Use case diagram&lt;/a&gt;: shows the functionality provided by a system in terms of actors, their goals represented as use cases, and any dependencies among those use cases.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;gallery&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-style: solid; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-width: 1px; color: black; font-size: 13px; margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding: 2px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;vertical-align: top;&quot;&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 20px; padding-left: 0px; padding-right: 0px; padding-top: 20px; padding: 20px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Activity_Diagram_1.jpg&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;106&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/f/fe/Activity_Diagram_1.jpg/120px-Activity_Diagram_1.jpg&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;UML Activity Diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 13px; padding-left: 0px; padding-right: 0px; padding-top: 13px; padding: 13px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:UML_state_diagram.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;120&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/b/be/UML_state_diagram.png/90px-UML_state_diagram.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;90&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/UML_state_machine&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;UML state machine&quot;&gt;State Machine&lt;/a&gt;&amp;nbsp;diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 37px; padding-left: 0px; padding-right: 0px; padding-top: 37px; padding: 37px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:UML_Use_Case_diagram.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;71&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/8/83/UML_Use_Case_diagram.png/120px-UML_Use_Case_diagram.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Use case diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/center&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Since behavior diagrams illustrate the behaviour of a system, they are used extensively to describe the functionality of software systems.&lt;/div&gt;&lt;h4 style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-color: initial; border-bottom-style: none; border-bottom-width: initial; border-bottom: none; color: black; font-size: 15px; font-weight: bold; margin-bottom: 0.3em; margin-left: 0px; margin-right: 0px; margin-top: 0px; margin: 0px 0px 0.3em; padding-bottom: 0.17em; padding-top: 0.5em; width: auto;&quot;&gt;&lt;span class=&quot;mw-headline&quot; id=&quot;Interaction_diagrams&quot;&gt;Interaction diagrams&lt;/span&gt;&lt;/h4&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Interaction diagrams, a subset of behaviour diagrams, emphasize the flow of control and data among the things in the system being modeled:&lt;/div&gt;&lt;ul style=&quot;line-height: 1.5em; list-style-image: url(http://bits.wikimedia.org/skins-1.5/vector/images/bullet-icon.png?1); list-style-type: square; margin-bottom: 0.5em; margin-left: 1.5em; margin-right: 0px; margin-top: 0.3em; margin: 0.3em 0px 0.5em 1.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; padding: 0px;&quot;&gt;&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Communication_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Communication diagram&quot;&gt;Communication diagram&lt;/a&gt;: shows the interactions between objects or parts in terms of sequenced messages. They represent a combination of information taken from Class, Sequence, and Use Case Diagrams describing both the static structure and dynamic behavior of a system.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Interaction_overview_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Interaction overview diagram&quot;&gt;Interaction overview diagram&lt;/a&gt;: are a type of activity diagram in which the nodes represent interaction diagrams.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Sequence_diagram&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Sequence diagram&quot;&gt;Sequence diagram&lt;/a&gt;: shows how objects communicate with each other in terms of a sequence of messages. Also indicates the lifespans of objects relative to those messages.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.1em;&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Timing_diagram_(Unified_Modeling_Language)&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot; title=&quot;Timing diagram (Unified Modeling Language)&quot;&gt;Timing diagrams&lt;/a&gt;: are a specific type of interaction diagram, where the focus is on timing constraints.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;gallery&quot; style=&quot;background-color: white; border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-style: solid; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-width: 1px; color: black; font-size: 13px; margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; padding: 2px;&quot;&gt;&lt;tbody&gt;
&lt;tr style=&quot;vertical-align: top;&quot;&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 34px; padding-left: 0px; padding-right: 0px; padding-top: 34px; padding: 34px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Kommunikations_diagramm-2.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;77&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/9/92/Kommunikations_diagramm-2.png/120px-Kommunikations_diagramm-2.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Communication diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 13px; padding-left: 0px; padding-right: 0px; padding-top: 13px; padding: 13px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Iau-diagramm-1.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;120&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/7/7a/Iau-diagramm-1.png/97px-Iau-diagramm-1.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;97&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Interaction overview diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; border-bottom-color: white; border-bottom-style: solid; border-bottom-width: 2px; border-color: white; border-left-color: white; border-left-style: solid; border-left-width: 2px; border-right-color: white; border-right-style: solid; border-right-width: 2px; border-style: solid; border-top-color: white; border-top-style: solid; border-top-width: 2px; border-width: 2px; vertical-align: top;&quot;&gt;&lt;div class=&quot;gallerybox&quot; style=&quot;margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; width: 155px;&quot;&gt;&lt;div class=&quot;thumb&quot; style=&quot;background-color: #f9f9f9; border-bottom-style: solid; border-bottom-width: 1px; border-bottom: solid; border-color: initial; border-left-style: solid; border-left-width: 1px; border-left: solid rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-right: solid rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; border-top: solid rgb(204, 204, 204); margin-bottom: 2px; margin-left: 2px; margin-right: 2px; margin-top: 2px; margin: 2px; padding-bottom: 14px; padding-left: 0px; padding-right: 0px; padding-top: 14px; padding: 14px 0px; text-align: center; width: 150px;&quot;&gt;&lt;div style=&quot;margin-left: auto; margin-right: auto; width: 120px;&quot;&gt;&lt;a class=&quot;image&quot; href=&quot;http://en.wikipedia.org/wiki/File:Sequenz_diagramm-1.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: initial; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial; color: #0645ad; text-decoration: none;&quot;&gt;&lt;img alt=&quot;&quot; height=&quot;117&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Sequenz_diagramm-1.png/120px-Sequenz_diagramm-1.png&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial; border-bottom-style: none; border-color: initial; border-left-style: none; border-right-style: none; border-style: none; border-top-style: none; border-width: initial; vertical-align: middle;&quot; width=&quot;120&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;gallerytext&quot; style=&quot;font-size: 12px; overflow-x: hidden; overflow-y: hidden; overflow: hidden; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; padding: 2px 4px;&quot;&gt;&lt;div style=&quot;line-height: 1.5em; margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0.4em; margin: 0.4em 0px 0.5em;&quot;&gt;Sequence diagram&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Page Content Source: Wikipedia&lt;/center&gt;&lt;center&gt;&lt;br /&gt;&lt;/center&gt;&lt;center style=&quot;text-align: left;&quot;&gt;&lt;a href=&quot;https://www.onlineinterviewquestions.com/uml-interview-questions/&quot; target=&quot;_blank&quot;&gt;More UML Questions&lt;/a&gt;&lt;/center&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/7669494478924390460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/7669494478924390460'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/uml.html' title='UML'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-1017759052272472722</id><published>2010-05-26T12:32:00.000-07:00</published><updated>2010-05-26T12:38:42.395-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="JDK"/><category scheme="http://www.blogger.com/atom/ns#" term="Release Date"/><title type='text'>JDK Release Dates</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGQ9QoMVFIXRopJzuhFZo-YgS0hczPZ52lQXx2TD6-a3cHogHZGRhEg1g5VaV0QtTNMk2q9uPvsMrjTcIswGl9IUVxa4e9G-Q9Fhujd1ZlLkOdBK_fkw0HULw1nXocOeN64A5Dg_yIOAE/s1600/java+get.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;87&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGQ9QoMVFIXRopJzuhFZo-YgS0hczPZ52lQXx2TD6-a3cHogHZGRhEg1g5VaV0QtTNMk2q9uPvsMrjTcIswGl9IUVxa4e9G-Q9Fhujd1ZlLkOdBK_fkw0HULw1nXocOeN64A5Dg_yIOAE/s200/java+get.jpg&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #421f00; font-family: &#39;Palatino Linotype&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span style=&quot;color: #421f00; font-family: &#39;Palatino Linotype&#39;, serif; font-size: 12pt;&quot;&gt;&lt;br /&gt;
Here are the dates the various Java versions were released. This table does not show the minor _01 _02 type releases. &lt;i&gt;Major releases 1.3, 1.4.0, 1.5.0 and 1.6.0 are named after birds or mammals, while minor releases are named after insects, given that they are bug-fix releases.&lt;/i&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #421f00; font-family: &#39;Palatino Linotype&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;MsoNormalTable&quot; style=&quot;border-collapse: collapse; border: none; margin-left: .5in; mso-border-alt: solid windowtext 3.0pt; mso-yfti-tbllook: 1184;&quot;&gt;&lt;thead&gt;
&lt;tr style=&quot;mso-yfti-firstrow: yes; mso-yfti-irow: 0;&quot;&gt;    &lt;td colspan=&quot;3&quot; style=&quot;background: #C1E2FF; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-size: 13pt;&quot;&gt;Java Versions Release Dates&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 1;&quot;&gt;    &lt;td style=&quot;background: #C1E2FF; border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-size: 13pt;&quot;&gt;version&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;    &lt;td style=&quot;background: #C1E2FF; border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-size: 13pt;&quot;&gt;Release Date&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;    &lt;td style=&quot;background: #C1E2FF; border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-size: 13pt;&quot;&gt;Code Name&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;   &lt;/tr&gt;
&lt;/thead&gt;  &lt;tbody&gt;
&lt;tr style=&quot;mso-yfti-irow: 2;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;JDK&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.0&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1996-01-23&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Oak?   Java first released to the public&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 3;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Java   version&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.1&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1997-02-18&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Sparkler&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 4;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;JDK&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.1.4&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1997-09-12&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Sparkler&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 5;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;JDK&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.1.5&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1997-12-03&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Pumpkin&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 6;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;JDK&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.1.6&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1998-04-24&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Abigail&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 7;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;JDK&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.1.7&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1998-09-28&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Brutus&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 8;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;JDK&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.1.8&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1999-04-08&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Chelsea&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 9;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.2&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1998-12-04&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Playground&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 10;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.2.1&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1999-03-30&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;(none)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 11;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.2.2&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;1999-07-08&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Cricket&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 12;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.3&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;2000-05-08&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Kestrel&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 13;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.3.1&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;2001-05-17&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Ladybird&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 14;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.4.0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;2002-02-13&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Merlin&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 15;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.4.1&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;2002-09-16&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Hopper   (Grasshopper)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 16;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.4.2&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;2003-06-26&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Mantis&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 17;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.5.0&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;br /&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;2004-09-29&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Tiger&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 18;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.5.1&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;N/A&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Dragonfly,   Dragon&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 19;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;6.0&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.6.0&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;span style=&quot;color: #8b7a11; font-family: &#39;Lucida Console&#39;; font-size: 12pt;&quot;&gt;2006-12-12&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Mustang&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 20;&quot;&gt;   &lt;td colspan=&quot;3&quot; style=&quot;background: #C1E2FF; border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div align=&quot;center&quot; class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt; text-align: center;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: black; font-size: 13pt;&quot;&gt;Future Releases&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;tr style=&quot;mso-yfti-irow: 21; mso-yfti-lastrow: yes;&quot;&gt;   &lt;td style=&quot;border-top: none; border: solid #A0A0A0 1.0pt; mso-border-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;J2SE&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;7.0&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;color: #436f7c; font-family: Consolas; font-size: 13pt;&quot;&gt;1.7.0&lt;/span&gt;&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;)&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;/td&gt;   &lt;td style=&quot;border-bottom: solid #A0A0A0 1.0pt; border-left: none; border-right: solid #A0A0A0 1.0pt; border-top: none; mso-border-alt: solid #A0A0A0 .75pt; mso-border-left-alt: solid #A0A0A0 .75pt; mso-border-top-alt: solid #A0A0A0 .75pt; padding: 3.75pt 3.75pt 3.75pt 3.75pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: 14.4pt; margin-bottom: 7.5pt; margin-left: 0in; margin-right: 0in; margin-top: 7.5pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;Dolphin&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Times New Roman&#39;, serif; font-size: 12pt;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;  &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; margin-left: .5in; margin-right: 0in; margin-top: 0in;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #421f00; font-family: &#39;Palatino Linotype&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;Mac OS programmers are still on Java version 1.5. To get Java version 1.6 they need Mac OS X.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/1017759052272472722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/1017759052272472722'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/jdk-release-dates.html' title='JDK Release Dates'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGQ9QoMVFIXRopJzuhFZo-YgS0hczPZ52lQXx2TD6-a3cHogHZGRhEg1g5VaV0QtTNMk2q9uPvsMrjTcIswGl9IUVxa4e9G-Q9Fhujd1ZlLkOdBK_fkw0HULw1nXocOeN64A5Dg_yIOAE/s72-c/java+get.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-5198563184582157002</id><published>2010-05-17T17:15:00.000-07:00</published><updated>2010-05-17T17:15:43.033-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="HTTP"/><category scheme="http://www.blogger.com/atom/ns#" term="WebLogic"/><category scheme="http://www.blogger.com/atom/ns#" term="WebServer"/><category scheme="http://www.blogger.com/atom/ns#" term="WebSphere"/><title type='text'>WebServer/ApplicationServer</title><content type='html'>A Web server exclusively handles HTTP requests, whereas an application server serves business logic to application programs through any number of protocols. A Web server serves pages for viewing in a Web browser, while an application server provides methods that client applications can call.&lt;div&gt;&lt;br /&gt;
Let&#39;s examine each in more detail.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;The Web server&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
A Web server handles the HTTP protocol. When the Web server receives an HTTP request, it responds with an HTTP response, such as sending back an HTML page. To process a request, a Web server may respond with a static HTML page or image, send a redirect, or delegate the dynamic response generation to some other program such as CGI scripts, JSPs (JavaServer Pages), servlets, ASPs (Active Server Pages), server-side JavaScripts, or some other server-side technology. Whatever their purpose, such server-side programs generate a response, most often in HTML, for viewing in a Web browser.&lt;br /&gt;
&lt;br /&gt;
Understand that a Web server&#39;s delegation model is fairly simple. When a request comes into the Web server, the Web server simply passes the request to the program best able to handle it. The Web server doesn&#39;t provide any functionality beyond simply providing an environment in which the server-side program can execute and pass back the generated responses. The server-side program usually provides for itself such functions as transaction processing, database connectivity, and messaging.&lt;br /&gt;
&lt;br /&gt;
While a Web server may not itself support transactions or database connection pooling, it may employ various strategies for fault tolerance and scalability such as load balancing, caching, and clustering—features oftentimes erroneously assigned as features reserved only for application servers.&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;The Application server:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
As for the application server,it exposes business logic to client applications through various protocols, possibly including HTTP. While a Web server mainly deals with sending HTML for display in a Web browser, an application server provides access to business logic for use by client application programs. The application program can use this logic just as it would call a method on an object.&lt;br /&gt;
&lt;br /&gt;
Such application server clients can include GUIs (graphical user interface) running on a PC, a Web server, or even other application servers. The information traveling back and forth between an application server and its client is not restricted to simple display markup. Instead, the information is program logic. Since the logic takes the form of data and method calls and not static HTML, the client can employ the exposed business logic however it wants.&lt;br /&gt;
&lt;br /&gt;
In most cases, the server exposes this business logic through a component API, such as the EJB (Enterprise JavaBean) component model found on J2EE (Java 2 Platform, Enterprise Edition) application servers. Moreover, the application server manages its own resources. Such gate-keeping duties include security, transaction processing, resource pooling, and messaging. Like a Web server, an application server may also employ various scalability and fault-tolerance techniques.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;An example:&lt;/b&gt;&lt;br /&gt;
As an example, consider an online store that provides real-time pricing and availability information. Most likely, the site will provide a form with which you can choose a product. When you submit your query, the site performs a lookup and returns the results embedded within an HTML page. The site may implement this functionality in numerous ways.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Scenario 1:&lt;/b&gt; Web server without an application server&lt;/i&gt;&lt;br /&gt;
In the first scenario, a Web server alone provides the online store&#39;s functionality. The Web server takes your request, then passes it to a server-side program able to handle the request. The server-side program looks up the pricing information from a database or a flat file. Once retrieved, the server-side program uses the information to formulate the HTML response, then the Web server sends it back to your Web browser.&lt;br /&gt;
To summarize, a Web server simply processes HTTP requests by responding with HTML pages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Scenario 2:&lt;/b&gt; Web server with an application server&lt;/i&gt;&lt;br /&gt;
Scenario 2 resembles Scenario 1 in that the Web server still delegates the response generation to a script. However, you can now put the business logic for the pricing lookup onto an application server. With that change, instead of the script knowing how to look up the data and formulate a response, the script can simply call the application server&#39;s lookup service. The script can then use the service&#39;s result when the script generates its HTML response.&lt;br /&gt;
&lt;br /&gt;
In this scenario, the application server serves the business logic for looking up a product&#39;s pricing information. That functionality doesn&#39;t say anything about display or how the client must use the information. Instead, the client and application server send data back and forth. When a client calls the application server&#39;s lookup service, the service simply looks up the information and returns it to the client.&lt;br /&gt;
&lt;br /&gt;
By separating the pricing logic from the HTML response-generating code, the pricing logic becomes far more reusable between applications. A second client, such as a cash register, could also call the same service as a clerk checks out a customer. In contrast, in Scenario 1 the pricing lookup service is not reusable because the information is embedded within the HTML page.&lt;i&gt; To summarize, in Scenario 2&#39;s model, the Web server handles HTTP requests by replying with an HTML page while the application server serves application logic by processing pricing and availability requests.&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;i&gt;&lt;br /&gt;
&lt;/i&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;Note:&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
Recently, XML Web services have blurred the line between application servers and Web servers. By passing an XML payload to a Web server, the Web server can now process the data and respond much as application servers have in the past.&lt;br /&gt;
&lt;br /&gt;
Additionally, most application servers also contain a Web server, meaning you can consider a Web server a subset of an application server. While application servers contain Web server functionality, developers rarely deploy application servers in that capacity. Instead, when needed, they often deploy standalone Web servers in tandem with application servers. Such a separation of functionality aids performance (simple Web requests won&#39;t impact application server performance), deployment configuration (dedicated Web servers, clustering, and so on), and allows for best-of-breed product selection.&lt;br /&gt;
&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/5198563184582157002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/5198563184582157002'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/webserverapplicationserver.html' title='WebServer/ApplicationServer'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-2589755914785653165</id><published>2010-05-16T19:20:00.000-07:00</published><updated>2010-06-07T09:49:39.374-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="RPC"/><category scheme="http://www.blogger.com/atom/ns#" term="UDDI"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Services"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>Web Services Answers</title><content type='html'>&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;b&gt;1. What is a Web service?&lt;/b&gt;&lt;br /&gt;
A Web service is any piece of software that makes itself available over the Internet and uses a standardized XML messaging system.&lt;br /&gt;
&lt;br /&gt;
XML is used to encode all communications to a Web service. For example, a client invokes a Web service by sending an XML message, then waits for a corresponding XML response. Because all communication is in XML, Web services are not tied to any one operating system or programming language--Java can talk with Perl; Windows applications can talk with Unix applications.&lt;br /&gt;
&lt;br /&gt;
Beyond this basic definition, a Web service may also have two additional properties:&lt;br /&gt;
First, a Web service can have a public interface, defined in a common XML grammar. The interface describes all the methods available to clients and specifies the signature for each method. Currently, interface definition is accomplished via the &lt;i&gt;Web Service Description Language (WSDL).&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Second, if you create a Web service, there should be some relatively simple mechanism for you to publish this fact. Likewise, there should be some simple mechanism for interested parties to locate the service and locate its public interface. The most prominent directory of Web services is currently available via UDDI, or &lt;i&gt;Universal Description, Discovery, and Integration.&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Web services currently run a wide variety of services from news syndication and stock-market data to weather reports and package-tracking systems.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;2.&amp;nbsp;What is new about Web services?&lt;/b&gt;&lt;br /&gt;
People have been using Remote Procedure Calls (RPC) for some time now, and they long ago discovered how to send such calls over HTTP.So, what is really new about Web services? The answer is &lt;b&gt;XML&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
XML lies at the core of Web services, and provides a common language for describing Remote Procedure Calls, Web services, and Web service directories. By standardizing on XML, different applications can more easily talk to one another, and this makes software a whole lot more interesting.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;3. What is the Web service protocol stack?&lt;/b&gt;&lt;br /&gt;
The Web service protocol stack is an evolving set of protocols used to define, discover, and implement Web services. The core protocol stack consists of four layers:&lt;br /&gt;
&lt;b&gt;-Service Transport:&lt;/b&gt; This layer is responsible for transporting messages between applications. Currently, this includes HTTP, SMTP, FTP, and newer protocols, such as Blocks Extensible Exchange Protocol (BEEP).&lt;br /&gt;
&lt;b&gt;-XML Messaging:&lt;/b&gt; This layer is responsible for encoding messages in a common XML format so that messages can be understood at either end. Currently, this includes XML-RPC and SOAP.&lt;br /&gt;
-&lt;b&gt;Service Description:&lt;/b&gt; This layer is responsible for describing the public interface to a specific Web service. Currently, service description is handled via the WSDL.&lt;br /&gt;
&lt;b&gt;-Service Discovery: &lt;/b&gt;This layer is responsible for centralizing services into a common registry, and providing easy publish/find functionality. Currently, service discovery is handled via the UDDI.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;4.&amp;nbsp;What is XML-RPC?&lt;/b&gt;&lt;br /&gt;
XML-RPC is a protocol that uses XML messages to perform Remote Procedure Calls. Requests are encoded in XML and sent via HTTP POST; XML responses are embedded in the body of the HTTP response.&amp;nbsp;More succinctly, XML-RPC = HTTP + XML + Remote Procedure Calls.&lt;br /&gt;
&lt;br /&gt;
Because XML-RPC is platform independent, diverse applications can communicate with one another. For example, a Java client can speak XML-RPC to a Perl server.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;5.What is SOAP?&lt;/b&gt;&lt;br /&gt;
SOAP is an XML-based protocol for exchanging information between computers. Although SOAP can be used in a variety of messaging systems and can be delivered via a variety of transport protocols, the main focus of SOAP is Remote Procedure Calls (RPC) transported via HTTP. Like XML-RPC, SOAP is platform independent, and therefore enables diverse applications to communicate with one another.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;6.&amp;nbsp;What is WSDL?&lt;/b&gt;&lt;br /&gt;
The Web Services Description Language (WSDL) currently represents the service description layer within the Web service protocol stack.&amp;nbsp;In a nutshell, WSDL is an XML grammar for specifying a public interface for a Web service. This public interface can include the following:&lt;br /&gt;
&lt;br /&gt;
Information on all publicly available functions.&lt;br /&gt;
Data type information for all XML messages.&lt;br /&gt;
Binding information about the specific transport protocol to be used.&lt;br /&gt;
Address information for locating the specified service.&lt;br /&gt;
&lt;br /&gt;
WSDL is not necessarily tied to a specific XML messaging system, but it does include built-in extensions for describing SOAP services.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 15px; line-height: 21px;&quot;&gt;------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;7. What is UDDI?&lt;/b&gt;&lt;br /&gt;
UDDI (Universal Description, Discovery, and Integration) currently represents the discovery layer within the Web services protocol stack.&lt;br /&gt;
&lt;br /&gt;
UDDI was originally created by Microsoft, IBM, and Ariba, and represents a technical specification for publishing and finding businesses and Web services.&amp;nbsp;At its core, UDDI consists of two parts:&lt;br /&gt;
&lt;br /&gt;
First, UDDI is a technical specification for building a distributed directory of businesses and Web services. Data is stored within a specific XML format, and the UDDI specification includes API details for searching existing data and publishing new data.&lt;br /&gt;
&lt;br /&gt;
Second, the UDDI Business Registry is a fully operational implementation of the UDDI specification.&lt;br /&gt;
Launched in May 2001 by Microsoft and IBM, the UDDI registry now enables anyone to search existing&lt;br /&gt;
UDDI data. It also enables any company to register themselves and their services.&lt;br /&gt;
&lt;br /&gt;
The data captured within UDDI is divided into three main categories:&lt;br /&gt;
&lt;i&gt;White Pages: &lt;/i&gt;This includes general information about a specific company. For example, business name, business description, and address.&lt;br /&gt;
&lt;i&gt;Yellow Pages: &lt;/i&gt;This includes general classification data for either the company or the service offered. For example, this data may include industry, product, or geographic codes based on standard taxonomies.&lt;br /&gt;
&lt;i&gt;Green Pages:&lt;/i&gt; This includes technical information about a Web service. Generally, this includes a pointer to an external specification, and an address for invoking the Web service.&lt;br /&gt;
&lt;br /&gt;
You can view the Microsoft UDDI site, or the IBM UDDI site. The complete UDDI specification is available at uddi.org.&lt;br /&gt;
&lt;br /&gt;
w3schools:&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana, helvetica, arial, sans-serif; font-size: 11px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 18px; font-weight: normal; margin-bottom: 10px; margin-top: 10px;&quot;&gt;What is SOAP?&lt;/h2&gt;&lt;div style=&quot;font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;SOAP is an XML-based protocol to let applications exchange information over HTTP.&lt;/div&gt;&lt;div style=&quot;font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;Or more simple: SOAP is a protocol for accessing a Web Service.&lt;/div&gt;&lt;ul style=&quot;font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;&lt;li&gt;SOAP stands for Simple Object Access Protocol&lt;/li&gt;
&lt;li&gt;SOAP is a communication protocol&lt;/li&gt;
&lt;li&gt;SOAP is a format for sending messages&lt;/li&gt;
&lt;li&gt;SOAP is designed to communicate via Internet&lt;/li&gt;
&lt;li&gt;SOAP is platform independent&lt;/li&gt;
&lt;li&gt;SOAP is language independent&lt;/li&gt;
&lt;li&gt;SOAP is based on XML&lt;/li&gt;
&lt;li&gt;SOAP is simple and extensible&lt;/li&gt;
&lt;li&gt;SOAP allows you to get around firewalls&lt;/li&gt;
&lt;li&gt;SOAP is a W3C standard&lt;/li&gt;
&lt;/ul&gt;&lt;hr style=&quot;background-color: #d4d4d4; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #d4d4d4; height: 1px;&quot; /&gt;&lt;h2 style=&quot;background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 18px; font-weight: normal; margin-bottom: 10px; margin-top: 10px;&quot;&gt;What is WSDL?&lt;/h2&gt;&lt;div style=&quot;font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;WSDL is an XML-based language for locating and describing Web services.&lt;/div&gt;&lt;ul style=&quot;font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;&lt;li&gt;WSDL stands for Web Services Description Language&lt;/li&gt;
&lt;li&gt;WSDL is based on XML&lt;/li&gt;
&lt;li&gt;WSDL is used to describe Web services&lt;/li&gt;
&lt;li&gt;WSDL is used to locate Web services&lt;/li&gt;
&lt;li&gt;WSDL is a W3C standard&lt;/li&gt;
&lt;/ul&gt;&lt;hr style=&quot;background-color: #d4d4d4; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #d4d4d4; height: 1px;&quot; /&gt;&lt;h2 style=&quot;background-color: transparent; color: black; font-family: verdana, helvetica, arial, sans-serif; font-size: 18px; font-weight: normal; margin-bottom: 10px; margin-top: 10px;&quot;&gt;What is UDDI?&lt;/h2&gt;&lt;div style=&quot;font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;UDDI is a directory service where companies can register and search for Web services.&lt;/div&gt;&lt;ul style=&quot;font-family: verdana, helvetica, arial, sans-serif;&quot;&gt;&lt;li&gt;UDDI stands for Universal Description, Discovery and Integration&lt;/li&gt;
&lt;li&gt;UDDI is a directory for storing information about web services&lt;/li&gt;
&lt;li&gt;UDDI is a directory of web service interfaces described by WSDL&lt;/li&gt;
&lt;li&gt;UDDI communicates via SOAP&lt;/li&gt;
&lt;li&gt;UDDI is built into the Microsoft .NET platform&lt;/li&gt;
&lt;/ul&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/2589755914785653165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/2589755914785653165'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/web-services-answers.html' title='Web Services Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-1326605536787398198</id><published>2010-05-13T15:20:00.000-07:00</published><updated>2010-05-16T15:11:44.079-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="JUnit"/><category scheme="http://www.blogger.com/atom/ns#" term="Testing"/><title type='text'>JUnit Answers</title><content type='html'>&lt;b&gt;1. What is JUnit?&lt;/b&gt;&lt;br /&gt;
It is a software testing framework for unit testing. It is written in Java and designed to test Java applications.&lt;br /&gt;
It is an Open Source Software maintained by the JUnit.org community.&lt;br /&gt;
&lt;br /&gt;
JUnit is a simple, open source framework to write and run repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. JUnit features include:&lt;br /&gt;
&lt;br /&gt;
► Assertions for testing expected results&lt;br /&gt;
► Test fixtures for sharing common test data&lt;br /&gt;
► Test runners for running tests&lt;br /&gt;
&lt;br /&gt;
JUnit was originally written by Erich Gamma and Kent Beck.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;2. Who Should Use JUnit, Developers or Testers?&lt;/b&gt;&lt;br /&gt;
I should say that JUnit is mostly used by developers. JUnit is designed for unit testing, which is really a coding process, not a testing process. But many testers or QA engineers, are also required to use JUnit for unit testing.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;3. Why Do You Use JUnit to Test Your Code?&lt;/b&gt;&lt;br /&gt;
This is a commonly asked question in a job interview. Your answer should have these points:&lt;br /&gt;
&lt;br /&gt;
► I believe that writing more tests will make me more productive, not less productive.&lt;br /&gt;
► I believe that tests should be done as soon as possible at the code unit level.&lt;br /&gt;
► I believe that using JUnit makes unit testing easier and faster.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;4. How To Write a Simple JUnit Test Class?&lt;/b&gt;&lt;br /&gt;
You should be able to write this simple test class with one test method:&lt;br /&gt;
&lt;br /&gt;
import org.junit.*;&lt;br /&gt;
public class HelloTest&lt;br /&gt;
{&lt;br /&gt;
@Test public void testHello()&lt;br /&gt;
{&lt;br /&gt;
String message = &quot;Hello World!&quot;;&lt;br /&gt;
Assert.assertEquals(12, message.length());&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;5. How To Compile a JUnit Test Class?&lt;/b&gt;&lt;br /&gt;
Compiling a JUnit test class is like compiling any other Java classes. The only thing you need watch out is that the JUnit JAR file must be included in the classpath. For example, to compile the test class HelloTest.java described previously, you should do this:&lt;br /&gt;
&lt;br /&gt;
javac -cp junit-4.4.jar HelloTest.java&lt;br /&gt;
&lt;br /&gt;
dir HelloTest.*&lt;br /&gt;
453 HelloTest.class&lt;br /&gt;
183 HelloTest.java&lt;br /&gt;
&lt;br /&gt;
The compilation is ok, if you see the HelloTest.class file.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;6. How To Run a JUnit Test Class?&lt;/b&gt;&lt;br /&gt;
A JUnit test class usually contains a number of test methods. You can run all test methods in a JUnit test class with the JUnitCore runner class. For example, to run the test class HelloTest.java described previously, you should do this:&lt;br /&gt;
&lt;br /&gt;
java -cp .;&lt;br /&gt;
junit-4.4.jar org.junit.runner.JUnitCore HelloTest&lt;br /&gt;
&lt;br /&gt;
JUnit version 4.4&lt;br /&gt;
Time: 0.015&lt;br /&gt;
OK (1 test)&lt;br /&gt;
&lt;br /&gt;
This output says that 1 tests performed and passed.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;7. What CLASSPATH Settings Are Needed to Run JUnit?&lt;/b&gt;&lt;br /&gt;
It doesn&#39;t matter if you run your JUnit tests from a command line, from an IDE, or from &quot;ant&quot;, you must define your CLASSPATH settings correctly. Here is what recommended by the JUnit FAQ with some minor changes:&lt;br /&gt;
&lt;br /&gt;
To run your JUnit tests, you&#39;ll need the following elemements in your CLASSPATH:&lt;br /&gt;
&lt;br /&gt;
* The JUnit JAR file.&lt;br /&gt;
* Location of your JUnit test classes.&lt;br /&gt;
* Location of classes to be tested.&lt;br /&gt;
* JAR files of class libraries that are required by classes to be tested.&lt;br /&gt;
&lt;br /&gt;
If attempting to run your tests results in a NoClassDefFoundError, then something is missing from your CLASSPATH.&lt;br /&gt;
&lt;br /&gt;
If you are running your JUnit tests from a command line on a Windows system:&lt;br /&gt;
&lt;br /&gt;
set CLASSPATH=c:\A\junit-4.4.jar;c:\B\test_classes;&lt;br /&gt;
c:\B\target_classes;c:\D\3rd_party.jar&lt;br /&gt;
&lt;br /&gt;
If you are running your JUnit tests from a command line on a Unix (bash) system:&lt;br /&gt;
&lt;br /&gt;
export CLASSPATH=/A/junit-4.4.jar:/B/test_classes:&lt;br /&gt;
/C/target_classes:/D/3rd_party.jar&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;8. How Do I Run JUnit Tests from Command Window?&lt;/b&gt;&lt;br /&gt;
To run JUnit tests from a command window, you need to check the following list:&lt;br /&gt;
&lt;br /&gt;
1. Make sure that JDK is installed and the &quot;java&quot; command program is accessible through the PATH setting. Type &quot;java -version&quot; at the command prompt, you should see the JVM reports you back the version string.&lt;br /&gt;
2. Make sure that the CLASSPATH is defined as shown in the previous question.&lt;br /&gt;
3. Invoke the JUnit runner by entering the following command:&lt;br /&gt;
&lt;br /&gt;
java org.junit.runner.JUnitCore&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;9. How To Write a JUnit Test Method?&lt;/b&gt;&lt;br /&gt;
This interview question is to check if you know the basic rules about writing a JUnit test method:&lt;br /&gt;
&lt;br /&gt;
* You need to mark the method as a JUnit test method with the JUnit annotation: @org.junit.Test.&lt;br /&gt;
* A JUnit test method must be a &quot;public&quot; method. This allows the runner class to access this method.&lt;br /&gt;
* A JUnit test method must be a &quot;void&quot; method. The runner class does not check any return values.&lt;br /&gt;
* A JUnit test should perform one JUnit assertion - calling an org.junit.Assert.assertXXX() method.&lt;br /&gt;
&lt;br /&gt;
Here is a simple JUnit test method:&lt;br /&gt;
&lt;br /&gt;
import org.junit.*;&lt;br /&gt;
@Test public void testHello() {&lt;br /&gt;
String message = &quot;Hello World!&quot;;&lt;br /&gt;
Assert.assertEquals(12, message.length());&lt;br /&gt;
}&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;10. Why Not Just Use a Debugger for Unit Testing?&lt;/b&gt;&lt;br /&gt;
* A debugger is designed for manual debugging and manual unit testing, not for automated unit testing. JUnit is designed for automated unit testing.&lt;br /&gt;
* Automated unit testing requires extra time to setup initially. But it will save your time, if your code requires changes many times in the future.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;11. Why Not Just Write a main() Method for Unit Testing?&lt;/b&gt;&lt;br /&gt;
It is possible to write a main() method in each class that needs to be tested for unit testing. In the main() method, you could create test object of the class itself, and write some tests to test its methods. However, this is not a recommended approach because of the following points:&lt;br /&gt;
&lt;br /&gt;
* Your classes will be cluttered with test code in main method. All those test codes will be packaged into the final product.&lt;br /&gt;
* If you have a lots of classes to test, you need to run the main() method of every class. This requires some extra coding effort.&lt;br /&gt;
* If you want the test results to be displayed in a GUI, you will have to write code for that GUI.&lt;br /&gt;
* If you want to log the results of tests in HTML format or text format, you will have to write additional code.&lt;br /&gt;
* If one method call fails, next method calls won&#39;t be executed. You will have to work-around this.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;12. Why Not Just Use System.out.println() for Unit Testing?&lt;/b&gt;&lt;br /&gt;
Inserting debug statements into code is a low-tech method for debugging it. It usually requires that output be scanned manually every time the program is run to ensure that the code is doing what&#39;s expected.&lt;br /&gt;
&lt;br /&gt;
It generally takes less time in the long run to codify expectations in the form of an automated JUnit test that retains its value over time. If it&#39;s difficult to write a test to assert expectations, the tests may be telling you that shorter and more cohesive methods would improve your design.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;13. Under What Conditions Should You Test set() and get() Methods?&lt;/b&gt;&lt;br /&gt;
Tests should be designed to target areas that might break. set() and get() methods on simple data types are unlikely to break. So no need to test them.&lt;br /&gt;
&lt;br /&gt;
set() and get() methods on complex data types are likely to break. So you should test them.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;14. Do You Need to Write a Test Class for Every Class That Need to Be Tested?&lt;/b&gt;&lt;br /&gt;
This is a simple question. But the answer shows your organization skills.&lt;br /&gt;
&lt;br /&gt;
The technical answer is no. There is no need to write one test class for each every class that need to be tested. One test class can contain many tests for many test target classes.&lt;br /&gt;
&lt;br /&gt;
But the practical answer is yes. You should design one test class per test target class for low level basic tests. This makes your test classes much easier to manage and maintain.&amp;nbsp;You should write separate test classes for high level tests that requires multiple target classes working together.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;15. What Are JUnit 3.8 Naming Conventions?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;Test Case Class:&lt;/b&gt; Named as [classname]Test.java, where &quot;classname&quot; is the name of the class that is being tested. A test case class define the fixture to run multiple tests. A test case class must be subclass of junit.framework.TestCase.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Test Method:&lt;/b&gt; Named test[XXX], where &quot;XXX&quot; is any unique name for this test. A test method name should be prefixed with &quot;test&quot; to allow the TestSuite class to extract it automatically. A test method must be declared as &quot;public&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Test Suite:&lt;/b&gt; Can be named any way you want to. But Eclipse uses &lt;b&gt;&lt;i&gt;AllTests.java&lt;/i&gt;&lt;/b&gt; as the name. A test suite is a collection of test cases.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;16. Can You Explain the Life Cycle of a JUnit 3.8 Test Case Class?&lt;/b&gt;&lt;br /&gt;
A JUnit 3.8 test case class contains a setUp() method, a tearDown() method and multiple testXXX() methods. When calling a test runner to run this test class, the runner will execute those methods in a specific order giving the test case class an execution life cycle like this:&lt;br /&gt;
&lt;br /&gt;
setUp()&lt;br /&gt;
testXXX1()&lt;br /&gt;
tearDown()&lt;br /&gt;
&lt;br /&gt;
setUp()&lt;br /&gt;
testXXX2()&lt;br /&gt;
tearDown()&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;17. Can You Explain the Life Cycle of a JUnit 4.4 Test Class?&lt;/b&gt;&lt;br /&gt;
A JUnit 4.4 test class contains a @Before method, an @After method and multiple @test methods. When calling a test runner to run this test class, the runner will execute those methods in a specific order giving the test class an execution life cycle like this:&lt;br /&gt;
&lt;br /&gt;
@Before&lt;br /&gt;
@Test XXX1&lt;br /&gt;
@After&lt;br /&gt;
&lt;br /&gt;
@Before&lt;br /&gt;
@Test XXX2&lt;br /&gt;
@After&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;18. How To Group Test Cases Class using JUnit TestSuite?&lt;/b&gt;&lt;br /&gt;
Usually, there are many classes to be tested in a Java application. For each Java class in the application you need to write a JUnit test case class containing multiple test methods.&lt;br /&gt;
&lt;br /&gt;
You could call a JUnit runner to run each JUnit test case class manually. But you should group all JUnit test case clases into a test suite with JUnit TestSuite.&lt;br /&gt;
&lt;br /&gt;
To group all test case classes together and run them a single unit, you should create a new class named like AllTests.java. In this class you must create a &quot;public static Test suite()&quot; method, which returns a TestSuite object as a container of test case classes.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;19. How Do You Test a private Method?&lt;/b&gt;&lt;br /&gt;
When a method is declared as &quot;private&quot;, it can only be accessed within the same class. So there is no way to test a &quot;private&quot; method of a target class from any test class.&lt;br /&gt;
&lt;br /&gt;
To resolve this problem, you have to perform unit testing manually. Or you have to change your method from &quot;private&quot; to &quot;protected&quot;.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;20. How Do You Test a protected Method?&lt;/b&gt;&lt;br /&gt;
When a method is declared as &quot;protected&quot;, it can only be accessed within the same package where the class is defined.&amp;nbsp;In order to test a &quot;protected&quot; method of a target class, you need to define your test class in the same package as the target class.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;21. How Do You Test Classes That Must Be Run in a J2EE Container?&lt;/b&gt;&lt;br /&gt;
To test classes that must be run in a J2EE container (e.g. servlets, EJBs), you should refactor J2EE components to delegate functionality to other objects that don&#39;t have to be run in a J2EE container will improve the design and testability of the software.&lt;br /&gt;
&lt;br /&gt;
Cactus is an open source JUnit extension that can be used to test J2EE components in their natural environment.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;22. How to create a Test Suite using JUnit in Eclipse?&lt;/b&gt;&lt;br /&gt;
There are four ways to create a JUnit test suite class in Eclipse with JUnit plugin: org.junit_3.8.1. First, select the directory (usually unit-tests) that you wish to create the test suite class in.&lt;br /&gt;
&lt;br /&gt;
1. Select File &amp;gt; New &amp;gt; Other... &amp;gt; Java &amp;gt; JUnit &amp;gt; JUnit Test Suite.&lt;br /&gt;
2. Select the arrow of the button in the upper left of the toolbar. Select Other... &amp;gt; Java &amp;gt; JUnit &amp;gt; JUnit Test Suite,&lt;br /&gt;
3. Right click on a package in the Package Explorer view in the Java Perspective, and select Other... &amp;gt; Java &amp;gt; JUnit &amp;gt; JUnit Test Suite,&lt;br /&gt;
4. You can create a normal Java class as shown in the Eclipse tutorial, but include junit.framework.TestSuite as the super class of the test class you are creating.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;23. Can You Describe Steps of Creating Test Case Classes in Eclipse?&lt;/b&gt;&lt;br /&gt;
Steps to create a test case class in Eclipse with JUnit plugin: org.junit_3.8.1.&lt;br /&gt;
&lt;br /&gt;
1. Use the Browse button to search for a different super class. The default super class is junit.framework.TestCase.&lt;br /&gt;
2. Check which method stubs you would like to create. You can create a main method, setUp(), tearDown(), or a constructor(), but all of these are optional. A constructor is only run when the test case class is first instantiated, but the setUp() and tearDown() methods are run before and after, respectively, each test case is run.&lt;br /&gt;
3. You can browse the application that you are creating for a class that you wish to test, or this could be left blank if you will generate the class while creating while creating the test.&lt;br /&gt;
&lt;br /&gt;
- If you selected a &quot;Class Under Test&quot; you can click the Next button, otherwise click Finish. You will be able to select which methods in the class under test that you want to write test cases for. The method signatures will be created for you. Click Finish. The new test case class will be open in the editor.&lt;br /&gt;
&lt;br /&gt;
- This test class demonstrates the basic functionality of the setUp() and tearDown() methods, and gives example test cases. The testForException() method demonstrates how to test that an exception is properly thrown.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;24.&amp;nbsp;How to Run a JUnit Test Case in Eclipse?&lt;/b&gt;&lt;br /&gt;
There are three ways to run JUnit Test Cases or Test Suites in Eclipse with JUnit plugin: org.junit_3.8.1.&lt;br /&gt;
&lt;br /&gt;
1. You can right click on the test case class or test suite class and select Run As &amp;gt; JUnit Test.&lt;br /&gt;
2. You can select a test case or suite and click the arrow on the icon or select Run from the toolbar, and select Run As &amp;gt; JUnit Test.&lt;br /&gt;
3. You can select a test case or suite and click the arrow on the icon or select Run from the toolbar, and select Run... From here you will create a new JUnit test configuration, and name it. You can choose to run a single test case, or run all test cases in a project or folder.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;25. How&amp;nbsp;To Create Test Class in Eclipse?&lt;/b&gt;&lt;br /&gt;
There are five ways to create a JUnit test case class in Eclipse with JUnit plugin: org.junit_3.8.1. First, select the directory (usually unittests/) that you wish to create the test case class in.&lt;br /&gt;
&lt;br /&gt;
1. Select File ; New ; JUnit Test Case.&lt;br /&gt;
2. Select the arrow of the button in the upper left of the toolbar. Select JUnit Test Case.&lt;br /&gt;
3. Right click on a package in the Package Explorer view in the Java Perspective, and select JUnitTestCase.&lt;br /&gt;
4. Click on the arrow of the icon in the toolbar. Select JUnit Test Case.&lt;br /&gt;
5. You can create a normal Java class as shown in the Eclipse tutorial, but include junit.framework.TestCase as the super class of the test class you are creating.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;26. &amp;nbsp;What Do You Do When a Defect Is Reported?&lt;/b&gt;&lt;br /&gt;
Test-driven development generally lowers the defect density of software. But we&#39;re all fallible, so sometimes a defect will slip through. When this happens, write a failing test that exposes the defect. When the test passes, you know the defect is fixed!&lt;br /&gt;
&lt;br /&gt;
Don&#39;t forget to use this as a learning opportunity. Perhaps the defect could have been prevented by being more aggressive about testing everything that could reasonably break. Or perhaps there are other places in the application that have the similar code that might break too.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;27.&amp;nbsp;How Often Should You Run Your JUnit Tests?&lt;/b&gt;&lt;br /&gt;
Run all your unit tests as often as possible, ideally every time the code is changed. Make sure all your unit tests always run at 100%. Frequent testing gives you confidence that your changes didn&#39;t break anything and generally lowers the stress of programming in the dark.&lt;br /&gt;
&lt;br /&gt;
For larger systems, you may just run specific test suites that are relevant to the code you&#39;re working on. Run all your acceptance, integration, stress, and unit tests at least once per day.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;28. Do You Have To Write a Test for Everything?&lt;/b&gt;&lt;br /&gt;
No, just test everything that could reasonably break.&lt;br /&gt;
&lt;br /&gt;
Be practical and maximize your testing investment. Remember that investments in testing are equal investments in design. If defects aren&#39;t being reported and your design responds well to change, then you&#39;re probably testing enough. If you&#39;re spending a lot of time fixing defects and your design is difficult to grow, you should write more tests.&lt;br /&gt;
&lt;br /&gt;
If something is difficult to test, it&#39;s usually an opportunity for a design improvement. Look to improve the design so that it&#39;s easier to test, and by doing so a better design will usually emerge.&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;29.&amp;nbsp;How Do You Test a Method That Does not Return Anything?&lt;/b&gt;&lt;br /&gt;
You need to follow the logic below to answer this question:&lt;br /&gt;
&lt;br /&gt;
* If a method is not returning anything through the &quot;return&quot; statement (void method), it may return data through its arguments. In this case, you can test the data returned in any argument.&lt;br /&gt;
* Else if a method is not returning any data through its arguments, it may change values of its instance variables. In this case, you can test changes of any instance variables.&lt;br /&gt;
* Else if a method is not changing any instance variable, it may change values of its class variables. In this case, you can test changes of any class variables.&lt;br /&gt;
* Else if a method is not changing any class variable, it may change external resources. In this case, you can test changes of any external resources.&lt;br /&gt;
* Else if a method is not changing any external resources, it may just doing nothing but holding the thread in a waiting status. In this case, you can test this waiting condition.&lt;br /&gt;
* Else if a method is not holding the thread in waiting status, then this method is really doing nothing. In this case, there is no need to test this method!&lt;br /&gt;
--------------------------------------------------------------&lt;br /&gt;
&lt;b&gt;30. When Should Unit Tests Should Be Written In Development Cycle?&lt;/b&gt;&lt;br /&gt;
If you are a TDD (Test-Driven Development) believer, you should write unit test before writing the code. Test-first programming is practiced by only writing new code when an automated test is failing.&lt;br /&gt;
&lt;br /&gt;
Good tests tell you how to best design the system for its intended use. They effectively communicate in an executable format how to use the software. They also prevent tendencies to over-build the system based on speculation. When all the tests pass, you know you&#39;re done!&lt;br /&gt;
&lt;br /&gt;
Whenever a customer test fails or a bug is reported, first write the necessary unit test(s) to expose the bug(s), then fix them. This makes it almost impossible for that particular bug to resurface later.&amp;nbsp;Test-driven development is gaining momentum these days compared to writing tests after the code.&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: large;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: navy; font-family: Geneva, Arial, sans-serif, tahoma;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: 23px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: navy; font-family: Geneva, Arial, sans-serif, tahoma;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: 23px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: navy; font-family: Geneva, Arial, sans-serif, tahoma;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: 23px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: navy; font-family: Geneva, Arial, sans-serif, tahoma;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: 23px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: navy; font-family: Geneva, Arial, sans-serif, tahoma;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; line-height: 23px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: black; font-family: &#39;Times New Roman&#39;; line-height: normal;&quot;&gt;&lt;div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/1326605536787398198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/1326605536787398198'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/junit.html' title='JUnit Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-4113963530078487104</id><published>2010-05-13T13:30:00.000-07:00</published><updated>2010-05-16T19:08:06.071-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="MySQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Stored Procedures"/><title type='text'>SQL Server Stored Procedures</title><content type='html'>&lt;div style=&quot;text-align: right;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Blogged Originally By : Tom O&#39;Neill&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Learning something new is challenging. Learning something new on your own redefines challenging.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;For a tutorial on MySQL Stored Procedures please visit &lt;/span&gt;&lt;a href=&quot;http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx&quot; target=&quot;new&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;MYSQL Tutorial&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;This article (for SQL Server) will consist of the following topics:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-What are stored procedures?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-What do you need to get started?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-Writing your first stored procedure&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-Writing more sophisticated stored procedures&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-Input Variables&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-Input Variables with SELECT and UPDATE Statements&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-Exercise: &amp;nbsp;Pass Data to a SELECT Stored Procedure&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;--------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;What Are Stored Procedures?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Have you ever written SQL statements, like inserts, selects, and updates? Then you have already written most of a stored procedure.&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt; A stored procedure is an already written SQL statement that is saved in the database. &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;If you find yourself using the same query over and over again, it would make sense to put it into a stored procedure. When you put this SQL statement in a stored procedure, you can then run the stored procedure from the database&#39;s command environment.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;An example is:&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exec usp_displayallusers&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The name of the stored procedure is &quot;usp_displayallusers&quot;, and &quot;exec&quot; tells SQL Server to execute the code in the stored procedure. (Note: &quot;usp_&quot; in front of the stored procedure name is used to designate this stored procedure as a user-created stored procedure.) The code inside the stored procedure can be something as simple as:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;SELECT * FROM USERLIST&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;This &quot;select&quot; statement will return all data in the USERLIST table. You may think, skeptically, that stored procedures aren’t terribly useful. Just save the query and run it when you need to. Too easy, right?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Well, there is more to the story. Many queries get more complex than &quot;select * from . . .&quot; &amp;nbsp;Also, you may want to call the stored procedure from an application, such as an ASP page, Visual Basic application, or a Java servlet. With a stored procedure, you can store all the logic in the database, and use a simple command to call the stored procedure. Later, if you decide to migrate from ASP to J2EE, you only need to change the application layer, which will be significantly easier. Much of the business logic will remain in the database.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif; font-weight: bold;&quot;&gt;Getting Started with Stored Procedures&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;What do I need to get started? &amp;nbsp;To begin writing stored procedures, the following are essential:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-A database management system.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-A database built inside the database management system.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-A text editor, such as Notepad or Query Analyzer.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Items 1 and 2 are absolutely essential. You can’t write stored procedures without a database. They would be useless. Sometimes, I write my procedures in Notepad (or another text editor), and copy them into the New Stored Procedure window in SQL Server.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Next, you will have to decide what you want your stored procedure to do. It can be tempting to just dive right into the task at hand, but it is always prudent to sketch out some ideas first. Some considerations should be:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-Do you want to view data in the database (SELECT), insert new records (INSERT INTO), or do I want to change an existing record (UPDATE)?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-With which tables will you have to work? Does it make sense to create a VIEW first?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-How often will this procedure actually be used?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Once you have struggled with these questions , you will be ready to start coding!&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Writing Your First Stored Procedure&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Finally!!! It is time to write your first stored procedure (assuming you have created your database). In SQL Server, under your database tree, select the &quot;Stored Procedures&quot; option from Enterprise Manager (when you gain more experience, you can use Query Analyzer to create stored procedures). There will be a number of system generated stored procedures there already. Just ignore them. Your next step is to right click on any of the existing stored procedures (don’t worry, you won’t actually use them), then select &quot;New Stored Procedure . . .&quot;&amp;nbsp; This will open the stored properties window I discussed above. The following code will appear already in the window:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE [PROCEDURE NAME] AS&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The first thing I usually do is provide some spacing (we’ll need it later). This isn’t required, and as you write more stored procedures, you will find a style with which you are comfortable.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*&amp;nbsp;We will use this area for comments&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE [PROCEDURE NAME]&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*&amp;nbsp;We will put the variables in here, later&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;AS&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*This is where the actual SQL statements will go*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;So far, it is pretty simple. Let’s look at the top comments section first,&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*We will use this area for comments*/&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;When you write stored procedures (especially for a business or academic project), you never know who will eventually have to alter the code. This top section is useful for comments about the stored procedure, a change log, and other pertinent information. While this is not required, it is just a good programming habit. For this exercise, make it look like this:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*Name:&amp;nbsp; usp_displayallusers&lt;br /&gt;
Description:&amp;nbsp; displays all records and columns in USERLIST table&lt;br /&gt;
Author:&amp;nbsp; Nahk&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Modification Log:&amp;nbsp;Change&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Changed By&lt;br /&gt;
Created procedure &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/13/2010 &amp;nbsp; &amp;nbsp;Nahk&lt;br /&gt;
*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Of course, you can use your own name and today’s date.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The next section will change only slightly. Every stored procedure needs the words &quot;CREATE PROCEDURE&quot; followed by the name you want to assign to the stored procedure. While not required, stored procedure names usually begin with the prefix &quot;usp_&quot;.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_displayallusers&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;This tells the database that you are creating a stored procedure named &quot;usp_displayallusers&quot;. So far, your stored procedure should look like this:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*&lt;br /&gt;
Name:&amp;nbsp; usp_displayallusers&lt;br /&gt;
Description:&amp;nbsp; displays all records and columns in USERLIST table&lt;br /&gt;
Author: &amp;nbsp;Nahk&lt;br /&gt;
Modification Log:&amp;nbsp;Change&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Changed By&lt;br /&gt;
Created procedure &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/13/2010 &amp;nbsp; &amp;nbsp;Nahk&lt;br /&gt;
*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_displayallusers&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The next step is to think about variables. Since this is our first stored procedure together, we won’t deal with them yet. Just keep in mind that they are usually added after the &quot;CREATE PROCEDURE&quot; line. Since we don’t have variables, the next step is quite simple. Put the word &quot;AS&quot; beneath the create procedure line.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_displayallusers&lt;br /&gt;
AS&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;We are telling the database that we want to create a stored procedure that is called &quot;usp_displayallusers&quot; that is characterized by the code that follows. After the &quot;AS&quot; entry, you will simply enter SQL code as you would in a regularly query. For our first, we will use a SELECT statement:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;SELECT * FROM USERLIST&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Now, your stored procedure should look like this:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*&lt;br /&gt;
Name:&amp;nbsp; usp_displayallusers&lt;br /&gt;
Description:&amp;nbsp; displays all records and columns in USERLIST table&lt;br /&gt;
Author: &amp;nbsp;Nahk&lt;br /&gt;
Modification Log:&amp;nbsp;Change&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Changed By&lt;br /&gt;
Created procedure &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/13/2010 &amp;nbsp; &amp;nbsp;Nahk&lt;br /&gt;
*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;CREATE PROCEDURE usp_displayallusers&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;AS&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;SELECT * FROM USERLIST&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Congratulations, you have written your first stored procedure. If you authored the procedure in a text editor, now would be a good time to copy it into the New Stored Procedure window in SQL Server. Once you have done so, click the &quot;Check Syntax&quot; box. This is a great troubleshooting tool for beginners and experts alike. When SQL Server tells you &quot;Syntax check successful!&quot;, you can click OK to save your stored procedure. To view the procedure, simply double-click usp_displayallusers in the Stored Procedures window. To run your stored procedure, open the Query Analyzer and type:&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;exec usp_displayallusers&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Then, click the green &quot;play&quot; button to run the query. You will see that the procedure has run successfully.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;right&quot; class=&quot;nav&quot; style=&quot;text-align: -webkit-left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;right&quot; class=&quot;nav&quot; style=&quot;text-align: -webkit-left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif; font-weight: bold; line-height: 19px;&quot;&gt;More Sophisticated Stored Procedures&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;right&quot; class=&quot;nav&quot; style=&quot;text-align: -webkit-left;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small; line-height: 19px;&quot;&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;In this section, we are going to address a few new topics. In addition to writing SELECT queries, you are going to want to insert, update, and delete database records. Also, you will probably want to pass information from outside the query. Since inserts and updates require some sort of data input to be useful, our first topic will be variables. From there, we will use data stored in variables for inserts and updates.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Note&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;:&amp;nbsp;In this article, we will only address input variables (variables that pass data to the SQL statement in the stored procedure). There are various types of outputs and returns, and they can become quite complex.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;b&gt;Input Variables&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;There are many reasons for wanting to pass data to a stored procedure, especially if your stored procedure is being called by a dynamic web page or other application. You may want to use a SELECT statement to pull information into the application for dynamic display. In this case, you would pass selection criteria to the stored procedure (for use in a WHERE clause). If you are inserting new records, you will need to get the data from somewhere. Updating existing records also involves simply&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;getting&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;the data. In both INSERT and UPDATE statements, it is necessary to pass data to the stored procedure. For INSERT, UPDATE, and SELECT statements (to name a few), you can pass the data to your stored procedure using variables.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Input variables are essentially &quot;storage&quot; for data that you want to pass to your stored procedure. Inside your stored procedure, you will declare variables at the top of the stored procedure. How does the data get there?&amp;nbsp;The data is entered in the&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;exec&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;statement that you use to kick off the stored procedure.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;There are two types of variables that you can create in SQL Server stored procedures:&amp;nbsp; Global and Local. Since this is for beginners, I don’t want to go crazy with too many options. We’ll stick to local variables for now. The only real requirement is that you begin your variable with the &quot;@&quot; symbol. Here are some examples:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;@f_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @fullname &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @HomePhone &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@ext&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;For every data element you want to pass, you will need to declare a variable. Declaring a variable is quite easy. You decide on a name and a datatype (integer, text, etc.), and indicate the name and datatype at the top of the procedure (below the &quot;CREATE PROCEDURE&quot; line). Let’s add a record to USERLIST. Remember the following:&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&quot;usr_id&quot; is the primary key, and is system-generated. We won’t need to pass a value for it.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&quot;login&quot;, &quot;pswd&quot;, &quot;l_name&quot;, and &quot;email&quot; are required fields. We will have to pass values for them.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;First, let’s create the header information that should be a part of every stored procedure.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*&lt;br /&gt;
Name:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;usp_adduser&lt;br /&gt;
Description:&amp;nbsp; Adds a user&lt;br /&gt;
Author:&amp;nbsp; Nahk&lt;br /&gt;
Modification Log:&amp;nbsp;Change&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Changed By&lt;br /&gt;
Created procedure &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/13/2010 &amp;nbsp; &amp;nbsp;Nahk&lt;br /&gt;
*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Remember this?&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue; font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_adduser&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*We will put the variables in here, later*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Add the &quot;CREATE PROCEDURE&quot; line, assigning the name &quot;usp_adduser&quot;. Our next step is to remove the comments and declare our variables!&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;To start, let’s look at how our variables will fit. We will need to create a variable for every value we may need to pass. We may not pass a value to every field every time we run the stored procedure. But, we do need to address the possibility that over the life of the stored procedure, every data element may be used. The best way to address this issue is to create a variable for every column in USERLIST. To keep this example simple, we are also assuming that each of the columns can be NULL, and we will also be passing all of the variables to the stored procedure. If some of the columns cannot be NULL, or if not all of the columns will be affected, then the stored procedure and/or the exec statement have to be rewritten slightly. The list below shows the variable and the field with which it is associated.&lt;/span&gt;&lt;/div&gt;&lt;ul type=&quot;disc&quot;&gt;&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@login—login&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@pswd—pswd&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@f_name—f_name&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@l_name—l_name&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@address_1—address_1&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@address_2—address_2&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@city—city&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@state—state&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@zipcode—zipcode&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@email—email&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;You have probably noticed that I gave the variables names that closely resemble the column names with which they are associated. This will make it easier for you to maintain the stored procedure in the future. Delete the comments about variables, and put your list of variables beneath the &quot;CREATE PROCEDURE&quot; line.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_adduser&lt;br /&gt;
@login&lt;br /&gt;
@pswd&lt;br /&gt;
@f_name&lt;br /&gt;
@l_name&lt;br /&gt;
@address_1&lt;br /&gt;
@address_2&lt;br /&gt;
@city&lt;br /&gt;
@state&lt;br /&gt;
@zipcode&lt;br /&gt;
@email&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Next, add datatypes to each of the variables. The datatype assigned to the variable should match the datatype assigned to the corresponding column in the database. For any elements with the &quot;char&quot;, &quot;varchar&quot;, or &quot;numeric&quot; datatypes, you will need to put the maximum character length list in parentheses after the datatype. Separate all variables (except the last one), with a comma.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_adduser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@login varchar(20),&lt;br /&gt;
@pswd varchar(20),&lt;br /&gt;
@f_name varchar(25),&lt;br /&gt;
@l_name varchar(35),&lt;br /&gt;
@address_1 varchar(30),&lt;br /&gt;
@address_2 varchar(30),&lt;br /&gt;
@city varchar(30),&lt;br /&gt;
@state char(2),&lt;br /&gt;
@zipcode char(10),&lt;br /&gt;
@email varchar(50)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt; &lt;br /&gt;
&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;With that last keystroke, you have created your first set of variables. To finish &quot;usp_adduser&quot;, we will have to figure out what we want the stored procedure to do, then add the appropriate code after the &quot;AS&quot; statement. This stored procedure will add a new record to the USERLIST table, so we should use an INSERT statement. The SQL should be:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;INSERT INTO USERLIST (login, pswd, f_name, l_name, address_1, address_2, city, state, zipcode, email)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The INSERT clause is pretty standard. The VALUES clause is a bit more complex. If you have worked with databases, you are probably accustomed to seeing something like this:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;VALUES (&#39;dnelson&#39;, &#39;dean2003&#39;, &#39;Dean&#39;, &#39;Nelson&#39;, &#39;200 Berkeley Street&#39;, &#39;&#39;, &#39;Boston&#39;, &#39;MA&#39;, &#39;02116&#39;, &#39;dnelson@test.com&#39;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Since we are passing values from variables, it will look a bit different. Instead of putting the actual values in the VALUES clause, we’ll just put the variables. You won’t need to use quotes.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;VALUES (@login, @pswd, @f_name, @l_name, @address_1, @address_2, @city, @state, @zipcode, @email)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;What does the entire stored procedure look like?&amp;nbsp; Let’s pull it all together.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/* &amp;nbsp;Name:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;usp_adduser&lt;br /&gt;
Description:&amp;nbsp; Add new logins.&lt;br /&gt;
Author:&amp;nbsp; Nahk&lt;br /&gt;
Modification Log:&amp;nbsp;Change&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Changed By&lt;br /&gt;
Created procedure &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/13/2010 &amp;nbsp; &amp;nbsp;Nahk &amp;nbsp;&amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_adduser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@login varchar(20),&lt;br /&gt;
@pswd varchar(20),&lt;br /&gt;
@f_name varchar(25),&lt;br /&gt;
@l_name varchar(35),&lt;br /&gt;
@address_1 varchar(30),&lt;br /&gt;
@address_2 varchar(30),&lt;br /&gt;
@city varchar(30),&lt;br /&gt;
@state char(2),&lt;br /&gt;
@zipcode char(10),&lt;br /&gt;
@email varchar(50)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;INSERT INTO USERLIST (login, pswd, f_name, l_name, address_1, address_2, city, state, zipcode, email)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;VALUES (@login, @pswd, @f_name, @l_name, @address_1, @address_2, @city, @state, @zipcode, @email)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;It looks pretty long and complex, though we know from the process above that the stored procedure is not necessarily complex; it just contains a lot of data.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Now, we have a stored procedure that can accept external data. What do we do with it?&amp;nbsp; How do we get the data?&amp;nbsp; It’s not that hard; I promise. We’ll start with the &quot;exec&quot; statement we used when we wrote our first stored procedure. Remember?&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;exec usp_displayallusers&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;We have a new stored procedure to execute, so this time, the command will be:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;exec usp_adduser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;There is still the issue of how to get our data into the stored procedure. Otherwise, all those variables will be useless. To get data into our stored procedure, simply add the information (in single quotes &#39; &#39;) after the execute statement.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;exec usp_adduser &#39; &#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Remember to pass as many parameters as you have variables, otherwise SQL Server will throw an error. Since we have ten variables, your execute statement should look like this:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;exec usp_adduser &#39; &#39;, &#39; &#39;, &#39; &#39;, &#39; &#39;, &#39; &#39;, &#39; &#39;, &#39; &#39;, &#39; &#39;, &#39; &#39;, &#39; &#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Next, let’s include the data that we will want to pass to usp_adduser. Your execute statement will look like:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;exec usp_adduser &#39;dnelson&#39;, &#39;dean2003&#39;, &#39;Dean&#39;, &#39;Nelson&#39;, &#39;200 Berkeley Street&#39;, &#39; &#39;, &#39;Boston&#39;, &#39;MA&#39;, &#39;02116&#39;, &#39;dnelson@test.com&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Running the query should be successful, and SQL Server will tell you that one row has been affected. Now, let’s try using input variables with some other query types.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;I&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: navy; font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;nput Variables with SELECT and UPDATE Statements&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 23px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 23px;&quot;&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Regardless of the type of SQL statement you use, variables work the same way. Look at the following stored procedure:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*&amp;nbsp;Name:&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;usp_updateuser&lt;br /&gt;
Description:&amp;nbsp; Updates user information&lt;br /&gt;
Author:&amp;nbsp; Nahk&lt;br /&gt;
Modification Log:&amp;nbsp;Change&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Changed By&lt;br /&gt;
Created procedure &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/13/2010 &amp;nbsp; &amp;nbsp;Nahk &amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_updateuser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@usr_id int,&lt;br /&gt;
@login varchar(20),&lt;br /&gt;
@pswd varchar(20),&lt;br /&gt;
@f_name varchar(25),&lt;br /&gt;
@l_name varchar(35),&lt;br /&gt;
@address_1 varchar(30),&lt;br /&gt;
@address_2 varchar(30),&lt;br /&gt;
@city varchar(30),&lt;br /&gt;
@state char(2),&lt;br /&gt;
@zipcode char(10),&lt;br /&gt;
@email varchar(50)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;UPDATE USERLIST&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;SET&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;login=@login,&lt;br /&gt;
pswd=@pswd,&lt;br /&gt;
f_name=@f_name,&lt;br /&gt;
l_name=@l_name,&lt;br /&gt;
address_1=@address_1,&lt;br /&gt;
address_2=@address_2,&lt;br /&gt;
city=@city,&lt;br /&gt;
state=@state,&lt;br /&gt;
zipcode=@zipcode,&lt;br /&gt;
email=@email&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;WHERE usr_id=@usr_id&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;What’s different about this stored procedure (compared to the INSERT stored procedure)?&amp;nbsp; Aside from the obvious fact that this is an UPDATE instead of an INSERT?&amp;nbsp; First, you should have noticed that we added another variable, @usr_id. This new variable has the datatype &quot;int&quot; because it is an integer field. Why did we have to do this?&amp;nbsp; In the INSERT stored procedure, we were creating a new record. Since usr_id is assigned by the system, we didn’t need to worry about it. Now we are updating an existing record. To ensure that we update the right record, we need to use the primary key as a filter. Notice that @usr_id shows up again in the WHERE clause, where we would normally have a value in quotes (like &#39;1233&#39;).&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;The other difference is that we have included the variables in the SET clause. Instead of:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;login=&#39;dnelson&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;we have used:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;login=@login&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Remember, when you use variables, you do not have to use quotes.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;----------------------------------------------- &lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 23px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Exercise:&amp;nbsp; Pass Data to a SELECT Stored Procedure&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Create a stored procedure that returns one record, based on the table’s primary key. Remember to:&lt;/span&gt;&lt;/div&gt;&lt;ol type=&quot;1&quot;&gt;&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Create the header record (commented)&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Create the stored procedure name and declare variables&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Create the rest of your stored procedure&lt;/span&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: navy;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Solution:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Stored Procedure:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;/*&amp;nbsp;Name:&amp;nbsp;usp_finduser&lt;br /&gt;
Description:&amp;nbsp; find a user&lt;br /&gt;
Author:&amp;nbsp; Nahk&lt;br /&gt;
Modification Log:&amp;nbsp;Change&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Description&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Changed By&lt;br /&gt;
Created procedure &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;5/13/2010 &amp;nbsp; &amp;nbsp;Nahk &amp;nbsp;*/&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;CREATE PROCEDURE usp_finduser&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;@usr_id int&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;AS&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;SELECT * FROM USERLIST&lt;br /&gt;
WHERE usr_id=@usr_id&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Execute Statement:&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;exec usp_finduser &#39;1&#39;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Did it work?&amp;nbsp; If not, check the if you have any user with the user_id as &#39;1&#39; or not.&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div align=&quot;left&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: navy;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;As stated earlier this article was a tutorial on Stored Procedures for the SQL Server. For a tutorial on Stored Procedures using MySQL &lt;/span&gt;&lt;a href=&quot;http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx&quot; target=&quot;new&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;click here&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;div align=&quot;left&quot;&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/4113963530078487104'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/4113963530078487104'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/sql-server-stored-procedures.html' title='SQL Server Stored Procedures'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-5316483766674245407</id><published>2010-05-02T11:38:00.000-07:00</published><updated>2019-06-30T02:43:37.601-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ArrayList"/><category scheme="http://www.blogger.com/atom/ns#" term="Collection"/><category scheme="http://www.blogger.com/atom/ns#" term="compareTo"/><category scheme="http://www.blogger.com/atom/ns#" term="Container"/><category scheme="http://www.blogger.com/atom/ns#" term="Enumeration"/><category scheme="http://www.blogger.com/atom/ns#" term="Generics"/><category scheme="http://www.blogger.com/atom/ns#" term="HashMap"/><category scheme="http://www.blogger.com/atom/ns#" term="Iterator"/><category scheme="http://www.blogger.com/atom/ns#" term="Map"/><category scheme="http://www.blogger.com/atom/ns#" term="Set"/><category scheme="http://www.blogger.com/atom/ns#" term="toString"/><category scheme="http://www.blogger.com/atom/ns#" term="Vector"/><title type='text'>JAVA Collections Answers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 20px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;Introduction to Collections:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;A collection — sometimes called a container — is simply an object that groups multiple elements into a single unit. Collections are used to store, retrieve, manipulate, and communicate aggregate data. Typically, they represent data items that form a natural group, such as a poker hand (a collection of cards), a mail folder (a collection of letters), or a telephone directory (a mapping of names to phone numbers).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Collection implementations in earlier versions of the Java platform included Vector, Hashtable, and array. However, those earlier versions did not contain a collections framework.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;*Differentiate between Collection and Collections.&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;Collection is an interface and collections is a class.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Collection is the root interface in the collection hierarchy. A collection represents a group of objects, known as its elements. Some collections allow duplicate elements and others do not. Some are ordered and others unordered. The SDK does not provide any direct implementations of this interface: it provides implementations of more specific subinterfaces like Set and List. This interface is typically used to pass collections around and manipulate them where maximum generality is desired.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The &lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;Collections&lt;/span&gt;&amp;nbsp;class consists exclusively of &lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;&lt;i&gt;static methods&lt;/i&gt;&lt;/span&gt; that operate on or return collections. It contains polymorphic algorithms that operate on collections, &quot;wrappers&quot;, which return a new collection backed by a specified collection, and a few other odds and ends.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhHfudjmGImJGwAFLbil1Z9Wq5cRWfZJLfmRb0z_tG1rRiNhpJu3VDkZOyurN_b6Jpwnf7fhyeZPvzSWQ1A5dYJbiN53_2NJPT0ztyw1BU1iomI4t6EFKQgqbhHCb5mxyzmdvARpY3YjM/s1600/collections.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;115&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhHfudjmGImJGwAFLbil1Z9Wq5cRWfZJLfmRb0z_tG1rRiNhpJu3VDkZOyurN_b6Jpwnf7fhyeZPvzSWQ1A5dYJbiN53_2NJPT0ztyw1BU1iomI4t6EFKQgqbhHCb5mxyzmdvARpY3YjM/s400/collections.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
The following list describes the core collection interfaces:&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;-&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;&lt;span style=&quot;color: black; font-size: 10pt;&quot;&gt;Collection&lt;/span&gt;&lt;/code&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;— the root of the collection hierarchy. A collection represents a group of objects known as its&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;apple-converted-space&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;i&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;elements&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;-&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;Set : A &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/util/Set.html&quot;&gt;Set &lt;/a&gt;is a collection that cannot contain duplicate elements.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;-&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;List :A &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/util/List.html&quot;&gt;List &lt;/a&gt;is an ordered collection (sometimes called a &lt;i&gt;sequence&lt;/i&gt;). Lists can contain duplicate elements. The user of a List generally has precise control over where in the List each element is inserted. The user can access elements by their integer index (position) eg ArrayList.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;-&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;Queue&amp;nbsp;— a collection used to hold multiple elements prior to processing.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;; font-size: medium;&quot;&gt;&lt;span style=&quot;color: black; font-size: 13.5pt;&quot;&gt;-&lt;span style=&quot;font-size-adjust: none; font-stretch: normal; font: 7pt/normal &amp;quot;Times New Roman&amp;quot;;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;times new roman&amp;quot; , serif; font-size: 12pt;&quot;&gt;Map :A &lt;a href=&quot;http://java.sun.com/j2se/1.4.2/docs/api/java/util/Map.html&quot;&gt;Map &lt;/a&gt;is an object that maps keys to values. Maps cannot contain duplicate keys: Each key can map to at most one value&amp;nbsp; eg HashMap.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;b&gt;Quick &lt;a href=&quot;https://opensourceforu.com/2015/06/data-structures-made-easy-with-java-collections/&quot; target=&quot;_blank&quot;&gt;Overview&lt;/a&gt;:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: orange;&quot;&gt;ArrayList class&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;This class uses dynamic arrays for storing elements, and arrays are sequentially arranged in the memory.&lt;/span&gt; It implements the List interface and extends the AbstractList class. &lt;span style=&quot;color: red;&quot;&gt;It can contain duplicate elements, and it maintains an insertion order. The elements can be accessed using the index notation. &lt;/span&gt;This class contains various inbuilt methods, which help in making data retrieval and manipulation easy.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://i2.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-3.jpg?w=485&amp;amp;ssl=1&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;532&quot; data-original-width=&quot;485&quot; height=&quot;640&quot; src=&quot;https://i2.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-3.jpg?w=485&amp;amp;ssl=1&quot; width=&quot;582&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 27px;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;LinkedList class&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This class uses a doubly-linked list to store elements. It maintains an insertion order, and it can be used as a list, stack or queue. It actually implements the List and Dequeue interfaces and extends the Abstract class. The add and remove methods are used to add and delete. The size method returns the number of lists in the list.&lt;span style=&quot;background-color: white; font-family: &amp;quot;roboto&amp;quot; , sans-serif; font-size: 27px;&quot;&gt;&lt;span style=&quot;color: orange;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;a href=&quot;https://i1.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-4.jpg?w=456&amp;amp;ssl=1&quot; imageanchor=&quot;1&quot; style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: medium; margin-left: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;480&quot; data-original-width=&quot;456&quot; height=&quot;640&quot; src=&quot;https://i1.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-4.jpg?w=456&amp;amp;ssl=1&quot; width=&quot;608&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 27px; font-weight: 400; line-height: 38px; margin: 30px 0px 20px;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;HashMap&lt;/span&gt;&lt;/h2&gt;
&lt;span style=&quot;color: red;&quot;&gt;This is used to store key value pairs&lt;/span&gt;. It implements the Map interface and is not a part of the collection. &lt;span style=&quot;color: red;&quot;&gt;HashMap uses the hashing technique to store key value pairs. The key value pair is called a bucket&lt;/span&gt;. Each bucket is stored in an array in the HashMap class. The hashing function works on the key and returns an index at which the bucket is stored. There are chances of two keys returning the same index upon hashing. In such cases, the buckets are stored at the same index but are linked, the same as in a Linked List. Each bucket contains the pointer to the next bucket. The equals method is overridden, and the value is fetched when the key matches the key in the bucket. HashMap contains two basic methods, called get and put, to get the value and put the key value pair in the map.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://i2.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-5.jpg?resize=350%2C270&amp;amp;ssl=1&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;270&quot; data-original-width=&quot;350&quot; height=&quot;492&quot; src=&quot;https://i2.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-5.jpg?resize=350%2C270&amp;amp;ssl=1&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 27px; font-weight: 400; line-height: 38px; margin: 30px 0px 20px;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;TreeMap&lt;/span&gt;&lt;/h2&gt;
The TreeMap class implements the Map interface by using a tree. A TreeMap provides an efficient means of storing key/value pairs in&lt;span style=&quot;color: red;&quot;&gt; sorted order&lt;/span&gt;, and allows rapid retrieval. &lt;span style=&quot;color: red;&quot;&gt;You should note that, unlike a HashMap, a TreeMap guarantees that its elements will be sorted in ascending key order. &lt;/span&gt;You can specify the sorting order while creating TreeMap by providing an explicit comparator to TreeMap. Basically, you can create TreeMap in Java in different waysa TreeMap with a natural sorting order, and TreeMap with custom sorting order by providing the comparator, by copying the sorting order from the other SortedMap, etc.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h2 style=&quot;background-color: white; box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 27px; font-weight: 400; line-height: 38px; margin: 30px 0px 20px;&quot;&gt;
&lt;span style=&quot;color: orange;&quot;&gt;TreeSet&lt;/span&gt;&lt;/h2&gt;
This provides an implementation of the Set interface that uses a tree for storage. Objects are stored in sorted, ascending order. Access and retrieval times are quite fast, which makes TreeSet an excellent choice when storing large amounts of sorted information that must be found quickly. It contains unique elements only.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://i0.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-7.jpg?resize=350%2C268&amp;amp;ssl=1&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;268&quot; data-original-width=&quot;350&quot; height=&quot;490&quot; src=&quot;https://i0.wp.com/opensourceforu.com/wp-content/uploads/2015/05/Figure-7.jpg?resize=350%2C268&amp;amp;ssl=1&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;1. What Is a Collections Framework?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
A collections framework is a unified architecture for representing and manipulating collections. All collections frameworks contain the following:&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Interfaces:&lt;/b&gt; These are abstract data types that represent collections. Interfaces allow collections to be manipulated independently of the details of their representation. In object-oriented languages, interfaces generally form a hierarchy.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Implementations: &lt;/b&gt;These are the concrete implementations of the collection interfaces. In essence, they are reusable data structures.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Algorithms:&lt;/b&gt; These are the methods that perform useful computations, such as searching and sorting, on objects that implement collection interfaces. The algorithms are said to be polymorphic: i.e the same method can be used on many different implementations of the appropriate collection interface. In essence, algorithms are reusable functionality.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;2. What is HashMap and Map?&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Map is Interface and Hashmap is class that implements this interface. &lt;a href=&quot;http://www.mkyong.com/java/how-to-use-hashmap-tutorial-java/&quot; target=&quot;_blank&quot;&gt;Click Here&lt;/a&gt; for example.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;3. What is the significance of ListIterator?&amp;nbsp;What is the difference b/w Iterator and ListIterator?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Iterator :&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;Enables you to cycle through a collection in the forward direction only, for obtaining or removing elements&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;ListIterator :&amp;nbsp;&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;It extends Iterator, allow bidirectional traversal of list and the modification of elements.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;4. Difference between HashMap and HashTable?&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;style8&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Can we make hashmap synchronized?&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1. The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (&lt;/span&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-style: normal;&quot;&gt;HashMap&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;allows null values as key and value whereas Hashtable doesn’t allow nulls&lt;/span&gt;&lt;/em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;).&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2. HashMap does not guarantee that the order of the map will remain constant over time.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;i&gt;3. HashMap is non synchronized whereas Hashtable is synchronized.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;4. Iterator in the HashMap is fail-safe while the enumerator for the Hashtable isn&#39;t.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;style10&quot; style=&quot;color: #585656; font-weight: bold; line-height: 1.6; text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Note on Some Important Terms&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1)Synchronized means only one thread can modify a hash table at one point of time. Basically, it means that any thread before performing an update on a hashtable will have to acquire a lock on the object while others will wait for lock to be released.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2)Fail-safe is relevant from the context of iterators. If an iterator has been created on a collection object and some other thread tries to modify the collection object &quot;structurally”, a concurrent modification exception will be thrown. It is possible for other threads though to invoke &quot;set&quot; method since it doesn’t modify the collection &quot;structurally”. However, if prior to calling &quot;set&quot;, the collection has been modified structurally, &quot;IllegalArgumentException&quot; will be thrown.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;HashMap can be synchronized by&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Map m = Collections.synchronizeMap(hashMap);&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;5. What is the difference between set and list?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;A Set stores elements in an unordered way and does not contain duplicate elements, whereas a list stores elements in an ordered way but may contain duplicate elements.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;6. Difference between Vector and ArrayList? What is the Vector class?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;i&gt;Vector is synchronized whereas ArrayList is not.&lt;/i&gt; The Vector class provides the capability to implement a growable array of objects. ArrayList and Vector class both implement the List interface. Both classes are implemented using dynamically resizable arrays, providing fast random access and fast traversal. In vector the data is retrieved using the elementAt() method while in ArrayList, it is done using the get() method. ArrayList has no default size while vector has a default size of 10. when you want programs to run in multithreading environment then use concept of vector because it is synchronized. But ArrayList is not synchronized so, avoid use of it in a multithreading environment.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;7. What is an Iterator interface? &amp;nbsp;What is its use?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The Iterator is an interface, used to traverse through the elements of a Collection. It is not advisable to modify the collection itself while traversing an Iterator.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;a href=&quot;http://www.mkyong.com/java/how-do-loop-iterate-a-list-in-java/&quot;&gt;Click Here on how to iterate a loop&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;8. What is the Collections API?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The Collections API is a set of classes and interfaces that support operations on collections of objects.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Example of classes: HashSet, HashMap, ArrayList, LinkedList, TreeSet and TreeMap.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Example of interfaces: Collection, Set, List and Map.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;9. What is the List interface?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The List interface provides support for ordered collections of objects.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
10.&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;How can we access elements of a collection?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;We can access the elements of a collection using the following ways:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1.Every collection object has get(index) method to get the element of the object. This method will return Object.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2.Collection provide Enumeration or Iterator object so that we can get the objects of a collection one by one.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;11. What is the Set interface?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The Set interface provides methods for accessing the elements of a finite mathematical set. Sets do not allow duplicate elements.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;12.What’s the difference between a queue and a stack?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Stack is a data structure that is based on last-in-first-out rule (LIFO), while queues are based on First-in-first-out (FIFO) rule.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;13.What is the Map interface?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The Map interface is used to associate keys with values.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;14. What is the Properties class?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The properties class is a subclass of Hashtable that can be read from or written to a stream. It also provides the capability to specify a set of default values to be used.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;15. Which implementation of the List interface provides for the fastest insertion of a new element into the middle of the list?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;a. Vector &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b. ArrayList &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;c. LinkedList &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;ArrayList and Vector both use an array to store the elements of the list. When an element is inserted into the middle of the list the elements that follow the insertion point must be shifted to make room for the new element. The LinkedList is implemented using a doubly linked list; an insertion requires only the updating of the links at the point of insertion. Therefore, the LinkedList allows for fast insertions and deletions.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;16. How can we use hashset in collection interface?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;This class implements the set interface, backed by a hash table (actually a HashMap instance). It makes no guarantees as to the iteration order of the set; in particular, it does not guarantee that the order will remain constant over time. This class permits the Null element.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;This class offers constant time performance for the basic operations (add, remove, contains and size), assuming the hash function disperses the elements properly among the buckets.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;17. What are differences between Enumeration, ArrayList, Hashtable and Collections and Collection?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;Enumeration:&lt;/span&gt; It is series of elements. It can be use to enumerate through the elements of a vector, keys or values of a hashtable. You can not remove elements from Enumeration.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;style10&quot; style=&quot;color: #585656; line-height: 1.6; text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;ArrayList:&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;It is re-sizable array implementation. Belongs to &#39;List&#39; group in collection. It permits all elements, including null. It is not thread -safe.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;style10&quot; style=&quot;color: #585656; font-weight: bold; line-height: 1.6; text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Hashtable:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;It maps key to value. You can use non-null value for key or value. It is part of group Map in collection.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;style10&quot; style=&quot;color: #585656; font-weight: bold; line-height: 1.6; text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Collections:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;It implements Polymorphic algorithms which operate on collections.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;style10&quot; style=&quot;color: #585656; font-weight: bold; line-height: 1.6; text-decoration: underline;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Collection:&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;It is the root interface in the collection hierarchy.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: small;&quot;&gt;What is the difference between an Array, ArrayList and a List?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Times New Roman&amp;quot;; font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;
An Array (System.Array) is fixed in size once it is allocated. You can&#39;t add items to it or remove items from it. Also, all the elements must be the same type. As a result, it is type safe, and is also the most efficient of the three, both in terms of memory and performance. Also, System.Array supports multiple dimensions (i.e. it has a &lt;a href=&quot;https://msdn.microsoft.com/en-us/library/system.array.rank(v=vs.110).aspx&quot;&gt;Rank&lt;/a&gt; property) while List and ArrayList do not (although you can create a List of Lists or an ArrayList of ArrayLists, if you want to).&lt;br /&gt;&lt;br /&gt;An ArrayList is a flexible array which contains a list of objects. You can add and remove items from it and it automatically deals with allocating space. If you store value types in it, they are boxed and unboxed, which can be a bit inefficient. Also, it is not type-safe.&lt;br /&gt;&lt;br /&gt;A List&amp;lt;&amp;gt; leverages generics; it is essentially a type-safe version of ArrayList. This means there is no boxing or unboxing (which improves performance) and if you attempt to add an item of the wrong type it&#39;ll generate a compile-time error.&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;18. What is difference between array and arraylist?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;An ArrayList is resizable, where as, an array is not. ArrayList is a part of the Collection Framework. We can store any type of objects, and we can deal with only objects. It is growable.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Array is collection of similar data items. We can have array of primitives or objects. It is of fixed size. We can have multi dimensional arrays.&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Array:&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;can store primitive&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ArrayList:&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;Stores object only&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Array:&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;fix size&lt;/span&gt;&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ArrayList:&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;resizable&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Array:&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;can have multi dimensional&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Array:&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;lang &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;ArrayList:&lt;/span&gt;&lt;/strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;Collection framework&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;19. Can you limit the initial capacity of vector in java?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Yes you can limit the initial capacity. We can construct an empty vector with specified initial capacity:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;public vector(int initialcapacity)&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;20. What method should the key class of Hashmap override?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The methods to override are equals() and hashCode().&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;21. What is the difference between Enumeration and Iterator?&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The functionality of Enumeration interface is duplicated by the Iterator interface. Iterator has a remove() method while Enumeration doesn&#39;t. Enumeration acts as Read-only interface, because it has the methods only to traverse and fetch the objects, where as using Iterator we can manipulate the objects also like adding and removing the objects.&amp;nbsp;So Enumeration is used when ever we want to make Collection objects as Read-only.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: &amp;quot;georgia&amp;quot; , &amp;quot;times new roman&amp;quot; , sans-serif; font-size: 19px;&quot;&gt;--------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;22.&amp;nbsp;What is the difference between List and List&lt;/b&gt;&lt;string&gt;&lt;b&gt; (not parametrized list and list parametrized by String) in Java ?&lt;/b&gt;&lt;/string&gt;&lt;br /&gt;
List stores Objects so every &quot;get&quot; from List has to cast object to desired type.&lt;br /&gt;
List&lt;string&gt; stores objects of type String only so casting is not necessary. Generalization gives compilation time error checking.&lt;/string&gt;&lt;br /&gt;
---------------------------------------------------------&lt;br /&gt;
&lt;b&gt;23.&amp;nbsp;Can you write your own generic types in Java ?&lt;/b&gt;&lt;br /&gt;
Yes.&lt;br /&gt;
---------------------------------------------------------&lt;br /&gt;
&lt;b&gt;24. What is a Comparator?&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;A comparison function, which imposes a&amp;nbsp;&lt;i&gt;total ordering&lt;/i&gt;&amp;nbsp;on some collection of objects. Comparators can be passed to a sort method (such as&amp;nbsp;&lt;tt&gt;Collections.sort&lt;/tt&gt;) to allow precise control over the sort order. Comparators can also be used to control the order of certain data structures (such as&amp;nbsp;&lt;tt&gt;TreeSet&lt;/tt&gt;&amp;nbsp;or&amp;nbsp;&lt;tt&gt;TreeMap&lt;/tt&gt;).&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;---------------------------------------------------------&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;25. Explain compareTo().&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
Often, it is not enough to simply know whether two strings are identical. For sorting applications, you need to know which is less than, equal to, or greater than the next. A string is less than another if it comes before the other in dictionary order. A string is greater than another if it comes after the other in dictionary order. The String method compareTo( ) serves this purpose.&lt;br /&gt;
&lt;br /&gt;
It has this general form: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;int compareTo(String str)&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Here, str is the String being compared with the invoking String. The result of the comparison is returned and is interpreted as shown here:&lt;br /&gt;
&lt;br /&gt;
&lt;i&gt;Value Meaning :&lt;/i&gt;&lt;br /&gt;
Less than zero- The invoking string is less than str.&lt;br /&gt;
Greater than zero- T he invoking string is greater than str.&lt;br /&gt;
Zero- The two strings are equal.&lt;br /&gt;
---------------------------------------------------------&lt;br /&gt;
&lt;b&gt;26. Explain toString().&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; font-weight: normal; line-height: 20px;&quot;&gt;The&lt;strong&gt;&amp;nbsp;toString() method&lt;/strong&gt;&amp;nbsp;is used when &lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;we need a string representation of an object&lt;/span&gt;. It is defined in Object class. This method can be overridden to customize the String representation of the Object.&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 20px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 20px;&quot;&gt;Example:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; line-height: 20px;&quot;&gt;C&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace; white-space: pre;&quot;&gt;lass PointCoordinates {&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;private int x, y;
 public PointCoordinates(int x, int y) { this.x = x;this.y = y; }
 public int getX() { return x; }
 public int getY() { return y; }
 public String toString()&amp;nbsp; // Custom toString() Method.&lt;/span&gt;&lt;/pre&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;
&lt;/span&gt;
&lt;pre&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;{  return &quot;X=&quot; + x + &quot; &quot; + &quot;Y=&quot; + y; }
}
public class ToStringDemo2 {
 public static void main(String args[]) {
  PointCoordinates point = new PointCoordinates(10, 10);
  System.out.println(point);
  String s = point + &quot; testing&quot;;
  System.out.println(s); }}&lt;/span&gt;&lt;/pre&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;&lt;b&gt;27.Why use an ArrayList instead of a Vector?&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;verdana&amp;quot;; font-size: 13px; line-height: 20px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &amp;quot;times new roman&amp;quot;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: medium; line-height: normal;&quot;&gt;All methods of the Vector class are synchronized. It is safe to access a Vector object from two threads. But if you only access a vector from a single thread—by far the more common case—your code wastes quite a bit of time with synchronization. In contrast, the ArrayList methods are not synchronized. We recommend that you use an ArrayList instead of a Vector whenever you don&#39;t need synchronization.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/5316483766674245407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/5316483766674245407'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/collections.html' title='JAVA Collections Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjhHfudjmGImJGwAFLbil1Z9Wq5cRWfZJLfmRb0z_tG1rRiNhpJu3VDkZOyurN_b6Jpwnf7fhyeZPvzSWQ1A5dYJbiN53_2NJPT0ztyw1BU1iomI4t6EFKQgqbhHCb5mxyzmdvARpY3YjM/s72-c/collections.jpg" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-5857544229105735853</id><published>2010-05-01T11:39:00.001-07:00</published><updated>2010-05-18T09:11:23.548-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Class"/><category scheme="http://www.blogger.com/atom/ns#" term="Encapsulation"/><category scheme="http://www.blogger.com/atom/ns#" term="Inheritance"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="Object"/><category scheme="http://www.blogger.com/atom/ns#" term="OOPS"/><category scheme="http://www.blogger.com/atom/ns#" term="Package"/><category scheme="http://www.blogger.com/atom/ns#" term="Polymorphism"/><title type='text'>general</title><content type='html'>&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 6pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Object-Oriented Programming Concepts&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://java.sun.com/docs/books/tutorial/java/concepts/object.html&quot; target=&quot;_top&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;What Is an Object?&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://java.sun.com/docs/books/tutorial/java/concepts/class.html&quot; target=&quot;_top&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;What Is a Class?&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;A class is a blueprint or prototype from which objects are created.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://java.sun.com/docs/books/tutorial/java/concepts/interface.html&quot; target=&quot;_top&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;What Is an Interface?&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior published by that interface.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://java.sun.com/docs/books/tutorial/java/concepts/package.html&quot; target=&quot;_top&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;What Is a Package?&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;A package is a namespace for organizing classes and interfaces in a logical manner. Placing your code into packages makes large software projects easier to manage.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Source Code Comments&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Three styles of comment notation are used in Java.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-Any text between &quot;//&quot; and the end of the line is a&amp;nbsp;comment.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-Text starting with &quot;/*&quot; and terminated with &quot;*/&quot; is used to make multiple-line comments.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-The&amp;nbsp;special form starting with &quot;/**&quot; and terminated with &quot;*/&quot; is used to create comments that can be processed&amp;nbsp;by the Javadoc program to produce HTML-formatted documentation.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Because any&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;statements must precede any class definitions, the required order for these primary&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;elements is as follows:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;- 0 or 1 package declaration&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;- 0, 1, or many&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;import&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;statements&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;- 1 or many class definitions, but at most one public class definition.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;u&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Java keywords:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;abstract default if private this boolean do implements protected throw break double import public throws byte else instanceof return transient case extends int short try catch final interface static void char finally long strictfp volatile class float native super while const for new switch&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;continue goto package synchronized&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Reserved Word:&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;I true, false, null, const, goto&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif;&quot;&gt;----------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;What are the Difference between Functions and Procedures?&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Answer:&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1. Functions are used for computations where as Procedures can be used&amp;nbsp;for performing business logic&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2. Functions MUST return a value, Procedures need not be.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;3) Function parameters are always IN, no OUT is possible&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;4) Function returns 1 value only. Procedure can return multiple&amp;nbsp;values(max. 1024)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;5) We can select the fields from function.In the case of procdure we cannot select the fields.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;6) Function do not return the images,text whereas stored procedures&amp;nbsp;returns all data types.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-weight: bold;&quot;&gt;How to swap two variables, without using third variable ?&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;&quot;&gt;Let the variable be a and b. Then&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;a=a*b;
b=a/b;
a=a/b;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Package Visiblity:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Visibility&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;of a class controls the ability of other classes to create objects or gain access to the&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;variables and methods in the class. There are various types of visibility:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Public visibility&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-A class, variable, or method declared public can be used by any class in&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;the program.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Protected visibility&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-A variable or method declared protected can be used only by classes in&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;the same package or in a derived class in the same or a different package.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Default, or package, visibility&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-If none of the visibility keywords are used, the item is said&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;to have package visibility, meaning that only classes in the same package can use it.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Private visibility&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-The&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;private&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;keyword is not used with classes, only with variables and&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;methods. A private variable or method can be used within a class only.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Identifiers&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Words used in programs to name variables, classes, methods, or labels are&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;identifiers&amp;nbsp;&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;and are subject to&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;strict rules. None of the Java reserved words may be used as identifiers. An identifier can begin with a&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;letter, a dollar sign, or an underscore character.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The compiler generates an error if you try to use a digit or any punctuation other than the dollar sign and underscore to start an identifier. Identifiers are case sensitive.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Array:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Examples of array declarations:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1. int[] counts ;&amp;nbsp;&amp;nbsp; 2. String names[] ;&amp;nbsp;&amp;nbsp; 3. boolean flags[][] ;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Statement 1 declares that the variable&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;counts&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;is an array of&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;int&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;primitives.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Statement 2 declares that the&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;variable&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;names&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;is an array of references to&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;String&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;objects.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Statement 3 declares that the variable&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;flags&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;is a two-dimensional array of&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;boolean&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;primitives.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;i&gt;Note that in these statements, I have not set the size of the arrays, and no memory has been allocated for the array items.&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Creating an Array&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;The size of an array is fixed when it is created with the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;new&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;operator or with special combined declaration&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;and initialization statements.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Here are examples of creating some arrays&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1. counts = new int[20] ; // assuming counts was declared int[]&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2. String names[] = new String[100] ; // combines declaration&amp;nbsp;and creation&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;3. boolean[][] flags = new boolean[8][8] ;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;When arrays of primitives are created, they are filled with the default values:&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;zero&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;for numerics and&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;false&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;for booleans. Reference variable arrays, on the other hand, are filled with the special value&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;null&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;. After you&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;have created an array, you can use the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;length&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;variable to find out the number of elements the array has.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Initializing an Array&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Arrays of primitives are automatically initialized to the default values, but reference variable arrays contain&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;references to objects only after you create each individual object. In other words, there is no way to &quot;bulk&quot;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;initialize. In the following code, statement 1 declares and creates an array of&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Point&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;objects, but there are no&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;objects in the array until statement 2 runs. Statement 3 illustrates use of the&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;length&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;variable belonging to the&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;array.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1. Point spots[] = new Point[20];&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2. for(int i = 0 ; i &amp;lt; 20 ; i++){spots[i] = new Point(i,0);}&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;3. int count = spots.length ;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Increment and Decrement&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;When an&amp;nbsp; operator appears in a larger expression, the order in which the modification occurs depends on the position of the operator, as shown in the following code fragment:&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;1. int x = 5 ;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;2. int y = x++ ; // y gets the value 5, before incrementing x&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;3. int y2 = ++x ; // y2 gets the value 7, after incrementingstatic variables, and variables declared inside code blocks.&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;-------------------------------------------------------------------------------------------------------------&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;b&gt;Here is a summary of the different configurations of nested classes:&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Nested static class&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;—A named class declared&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;static&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;. It can directly access only static&amp;nbsp;variables and methods. It is considered a top-level class.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Nested interface&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;—A named interface, declared as a static member of a class, typically&amp;nbsp;used for defining methods used to access the enclosing class.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Inner class (member)&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;—A named class defined as a member of the enclosing class. It must&amp;nbsp;be associated with an instance of the enclosing class. There can be multiple member inner&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;classes in an enclosing class. Member inner classes can be declared as&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;public, private,&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;protected, final,&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;or&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;abstract,&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;but they cannot have the same name as any enclosing class.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Inner class (local)&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;—A named class defined in a code block in a method of the enclosing&amp;nbsp;class. The inner class can access local variables in the method and parameters passed to&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;the method only if the variables are declared&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;. As with a local variable, the inner class&amp;nbsp;cannot be accessed outside the code block; in other words, the scope of the class is&amp;nbsp;confined to the code block.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 0in;&quot;&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;Inner class (anonymous)&lt;/span&gt;&lt;/i&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;—A class defined inside a single expression, having no name or&amp;nbsp;constructor method. These classes can access local variables in the method and parameters&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;passed to the method only if they are declared&amp;nbsp;&lt;/span&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;final&lt;/span&gt;&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: inherit;&quot;&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; margin-bottom: 5pt;&quot;&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/5857544229105735853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/5857544229105735853'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/05/general.html' title='general'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-367960865104729373</id><published>2010-04-30T22:13:00.000-07:00</published><updated>2010-05-17T17:44:54.388-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DOM"/><category scheme="http://www.blogger.com/atom/ns#" term="DTD"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML"/><category scheme="http://www.blogger.com/atom/ns#" term="SAX"/><category scheme="http://www.blogger.com/atom/ns#" term="Schema"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><category scheme="http://www.blogger.com/atom/ns#" term="XSL"/><category scheme="http://www.blogger.com/atom/ns#" term="XSLT"/><title type='text'>XML Answers</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px;&quot;&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;1.&lt;/span&gt;What is XML?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Extensible Markup Language (XML) is the universal language for data on the Web&lt;/li&gt;
&lt;li&gt;XML is a technology which allows us to create our own markup language.&lt;/li&gt;
&lt;li&gt;XML documents are universally accepted as a standard way of representing information in platform and language independent manner.&lt;/li&gt;
&lt;li&gt;XML is universal standard for information interchange.&lt;/li&gt;
&lt;li&gt;XML documents can be created in any language and can be used in any language.&lt;/li&gt;
&lt;/ul&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;2.&lt;/span&gt;&lt;strong&gt;What is the difference between XML and HTML?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;XML is no way clashes with HTML, since they are for two different purposes.&lt;br /&gt;
&lt;br /&gt;
HTML:&lt;br /&gt;
-&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;HTML is for displaying purpose.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;-HTML is used to mark up text so it can be displayed to users.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;HTML describes both structure&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: small;&quot;&gt;and appearance.&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-size: medium;&quot;&gt;&lt;i&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-style: normal;&quot;&gt;HTML uses a fixed, unchangeable set of tags&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;XML:&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;-XML is for data representation.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;- XML is used to mark up data so it can&amp;nbsp;be processed by computers.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;-&amp;nbsp;XML describes only content,&amp;nbsp;or “meaning”.&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;- In XML, you make up your own tags&lt;/span&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;3.&lt;/span&gt;What are the benefits of XML?&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;There are many benefits of using XML on the Web :&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;&lt;strong&gt;Simplicity&lt;/strong&gt;- Information coded in XML is easy to read and understand, plus it can be processed easily by computers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Openness&lt;/strong&gt;- XML is a W3C standard, endorsed by software industry market leaders.&lt;/li&gt;
&lt;li&gt;E&lt;strong&gt;xtensibility&lt;/strong&gt;&amp;nbsp;- There is no fixed set of tags. New tags can be created as they are needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Self-description&lt;/strong&gt;- In traditional databases, data records require schemas set up by the database administrator. XML documents can be stored without such definitions, because they contain meta data in the form of tags and attributes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Contains machine-readable context information-&amp;nbsp;&lt;/strong&gt;Tags, attributes and element structure provide context information that can be used to interpret the meaning of content, opening up new possibilities for highly efficient search engines, intelligent data mining, agents, etc.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Separates content&amp;nbsp; from presentation&lt;/strong&gt;- XML tags describe meaning not presentation. The motto of HTML is: &quot;I know how it looks&quot;, whereas the motto of XML is: &quot;I know what it means, and you tell me how it should look.&quot; The look and feel of an XML document can be controlled by XSL style sheets, allowing the look of a document to be changed without touching the content of the document. Multiple views or presentations of the same content are easily rendered.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Supports multilingual documents and Unicode&lt;/strong&gt;-This is important for the internationalization of applications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Facilitates the comparison and aggregation of data&lt;/strong&gt;&amp;nbsp;- The tree structure of XML documents allows documents to be compared and aggregated efficiently element by element.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Can embed multiple data types&lt;/strong&gt;&amp;nbsp;- XML documents can contain any possible data type - from multimedia data (image, sound, video) to active components (Java applets, ActiveX).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Can embed existing data&lt;/strong&gt;&amp;nbsp;- Mapping existing data structures like file systems or relational databases to XML is simple. XML supports multiple data formats and can cover all existing data structures and .&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Provides a &#39;one-server view&#39; for distributed data&lt;/strong&gt;&amp;nbsp;- XML documents can consist of nested elements that are distributed over multiple remote servers. XML is currently the most sophisticated format for distributed data - the World Wide Web can be seen as one huge XML database.&lt;/li&gt;
&lt;/ul&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;4.&lt;/span&gt;&lt;strong&gt;What is a well-formed XML document?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;If a document is syntactically correct it can be called as well-formed XML documents. A well-formed document conforms to XML&#39;s basic rules of syntax:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Every open tag must be closed.&lt;/li&gt;
&lt;li&gt;The open tag must exactly match the closing tag: XML is case-sensitive.&lt;/li&gt;
&lt;li&gt;All elements must be embedded within a single root element.&lt;/li&gt;
&lt;li&gt;Child tags must be closed before parent tags.&lt;/li&gt;
&lt;li&gt;A well-formed document has correct XML tag syntax, but the elements might be invalid for the specified document type.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;5.&lt;/span&gt;&lt;strong&gt;What is a valid XML document?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;If a document is structurally correct then it can be called as valid XML documents. A valid document conforms to the predefined rules of a specific type of document:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;These rules can be written by the author of the XML document or by someone else.&lt;/li&gt;
&lt;li&gt;The rules determine the type of data that each part of a document can contain.&lt;/li&gt;
&lt;/ul&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&lt;strong&gt;Note&lt;/strong&gt;:&lt;em&gt;Valid XML document is implicitly well-formed, but well-formed may not be valid&lt;/em&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;6.&lt;/span&gt;&lt;strong&gt;What is the structure of XML document&lt;/strong&gt;&amp;nbsp;?&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;img align=&quot;middle&quot; alt=&quot;XML Structure&quot; border=&quot;0&quot; height=&quot;222&quot; src=&quot;http://www.developersbook.com/xml/images/XML-Structure.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot; class=&quot;title&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold;&quot;&gt;Figure 1: XML Structure&lt;/div&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;7.&lt;/span&gt;&lt;strong&gt;What is a Processing Instruction in XML?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;A ProcessingIntruction is the information which we would like to give to application. Through a ProcessingInstruction an application would get idea about how to process the document. A ProcessingInstruction can appear anywhere and any no. of times in a document.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;8.&lt;/span&gt;&lt;strong&gt;How does the XML structure is defined?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;XML document will have a structure which has to be defined before we can create the documents and work with them. The structural rules can be defined using many available technologies, but the following are popular way of doing so-&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Document Type Definition (DTD)&lt;/li&gt;
&lt;li&gt;Schema&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;9.&lt;/span&gt;&lt;strong&gt;What is DTD?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;A&amp;nbsp;&lt;strong&gt;Document Type Definition&lt;/strong&gt;&amp;nbsp;(DTD) defines the legal building blocks of an XML document. It defines rules for a specific type of document, including:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Names of elements, and how and where they can be used&lt;/li&gt;
&lt;li&gt;The order of elements&lt;/li&gt;
&lt;li&gt;Proper nesting and containment of elements&lt;/li&gt;
&lt;li&gt;Element attributes&lt;/li&gt;
&lt;/ul&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;To apply a DTD to an XML document, you can:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Include the DTD&#39;s element definitions within the XML document itself.&lt;/li&gt;
&lt;li&gt;Provide the DTD as a separate file, whose name you reference in the XML document.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;10.&lt;/span&gt;&lt;strong&gt;What is XML Schema?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;An XML&amp;nbsp;&lt;strong&gt;Schema&lt;/strong&gt;&amp;nbsp;describes the structure of an XML instance document by defining what each element must or may contain.XML Schema is expressed in the form of a separate XML file.&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;XML Schema provides much more control on element and attribute datatypes.&lt;/li&gt;
&lt;li&gt;Some datatypes are predefined and new ones can be created.&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;mid&quot; style=&quot;-webkit-background-clip: initial; -webkit-background-origin: initial; background-attachment: initial; background-color: #fafafa; background-image: initial; background-repeat: initial; border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 2px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 2px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 2px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 2px; font: normal normal normal 90%/150% &#39;Courier New&#39;, Courier; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 0px; padding-right: 0px; padding-top: 0px; width: 754px;&quot;&gt;&lt;span class=&quot;style1&quot;&gt;&lt;xsd:&gt;&lt;/xsd:&gt;&lt;/span&gt;&lt;span class=&quot;style2&quot;&gt;schema&lt;/span&gt;  &lt;span class=&quot;style3&quot;&gt;xmlns&lt;/span&gt;:xsd=&quot;&lt;span class=&quot;style2&quot;&gt;http://www.w3.org/2001/XMLSchema&lt;/span&gt;&quot;&amp;gt;
    &lt;span class=&quot;style3&quot;&gt;&lt;xsd&gt;&lt;/xsd&gt;&lt;/span&gt;:&lt;span class=&quot;style4&quot;&gt;element&lt;/span&gt;  &lt;span class=&quot;style3&quot;&gt;name&lt;/span&gt;=&quot;&lt;span class=&quot;style4&quot;&gt;test&lt;/span&gt;&quot;&amp;gt;
       &lt;span class=&quot;style3&quot;&gt;&lt;xsd&gt;&lt;/xsd&gt;&lt;/span&gt;:&lt;span class=&quot;style4&quot;&gt;complexType&lt;/span&gt;&amp;gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div align=&quot;center&quot;&gt;&lt;img align=&quot;middle&quot; alt=&quot;Xchema&quot; border=&quot;0&quot; height=&quot;267&quot; src=&quot;http://www.developersbook.com/xml/images/schema.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot; class=&quot;title&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold;&quot;&gt;Figure 2: XML Schema&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;11.&lt;/span&gt;&lt;strong&gt;What are differences between DTDs and Schema?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;DTD:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-weight: normal;&quot;&gt;DTDs follow SGML syntax.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;-I&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-weight: normal;&quot;&gt;n DTD everything is treated as text.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;&lt;b&gt;-Relationships&lt;/b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-weight: normal;&quot;&gt;&amp;nbsp;is not possible in DTD without invalidating existing documents.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-weight: normal;&quot;&gt;Grouping of elements and attributes is&amp;nbsp;not possible in DTD.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;-I&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-weight: normal;&quot;&gt;t is not possible to specify an upper&amp;nbsp;limit of an element in DTDs.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px; font-weight: 800;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse;&quot;&gt;Schema:&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-size: 13px; font-weight: 800;&quot;&gt;-S&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;chema document is an XML document i.e.the structure of an XML document is specified&amp;nbsp;by another XML document.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-size: 13px; font-weight: 800;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Schema supports variety of dataTypes similar to&amp;nbsp;programming language.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-size: 13px; font-weight: 800;&quot;&gt;-I&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;n Schema,&amp;nbsp; It is possible to inherit and create&amp;nbsp;relationship among elements.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-size: 13px; font-weight: 800;&quot;&gt;-&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;In Schema, It is possible to group elements and&amp;nbsp;attributes so that they can be treated as single logical unit.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; border-collapse: collapse; font-size: 13px; font-weight: 800;&quot;&gt;-I&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;n Schemas, it is possible to specify an upper limit for the number of occurrences of an element.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;&lt;br /&gt;
12.&lt;/span&gt;&lt;strong&gt;What is a Complex Element?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;A complex element is an XML element that contains other elements and/or attributes.&lt;br /&gt;
There are four kinds of complex elements:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;empty elements&lt;/li&gt;
&lt;li&gt;elements that contain only other elements&lt;/li&gt;
&lt;li&gt;elements that contain only text&lt;/li&gt;
&lt;li&gt;elements that contain both other elements and text&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;13.&lt;/span&gt;&lt;strong&gt;What is a Simple Element?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;A simple element is an XML element that can contain only text.&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;A simple element cannot have attributes&lt;/li&gt;
&lt;li&gt;A simple element cannot contain other elements&lt;/li&gt;
&lt;li&gt;A simple element cannot be empty&lt;/li&gt;
&lt;li&gt;However, the text can be of many different types, and may have various restrictions applied to it&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;14.&lt;/span&gt;&lt;strong&gt;What are namespaces? Why are they important?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;A simple element is an XML element that can contain only text.&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Namespaces are a simple and straightforward way to distinguish names used in XML documents, no matter where they come from.&lt;/li&gt;
&lt;li&gt;XML namespaces are used for providing uniquely named elements and attributes in an XML instance&lt;/li&gt;
&lt;li&gt;They allow developers to qualify uniquely the element names and relationships and make these names recognizable, to avoid name collisions on elements that have the same name but are defined in different vocabularies.&lt;/li&gt;
&lt;li&gt;They allow tags from multiple namespaces to be mixed, which is essential if data is coming from multiple sources.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&lt;strong&gt;Example:&amp;nbsp;&lt;/strong&gt;a bookstore may define the . Namespaces help define this distinction clearly.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Note:&lt;/strong&gt;&amp;nbsp;&lt;em&gt;a) Every namespace has a unique name which is a string. To maintain the uniqueness among namespaces a IRL is most preferred approach, since URLs are unique.&lt;/em&gt;&lt;/div&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b)&amp;nbsp;&lt;em&gt;Except for no-namespace Schemas, every XML Schema uses at least two namespaces:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1.the target namespace.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. The XMLSchema namespace (http://w3.org/2001/XMLSchema)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/em&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;15.&lt;/span&gt;&lt;strong&gt;What are the ways to use namespaces?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;There are two ways to use namespaces:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Declare a default namespace&lt;/li&gt;
&lt;li&gt;Associate a prefix with a namespace, then use the prefix in the XML to refer to the namespace.&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;16.&lt;/span&gt;&lt;strong&gt;What is the relevance of ElementFormDefault attribute in the Schema?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;ElementFormDefault indicates whether or not locally declared elements must be qualified by the target namespace in an instance document. ElementFormDefault attribute in the Schema has the following relevance:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;&lt;strong&gt;Qualified&lt;/strong&gt;: Each and every element of the Schema must be qualified with the namespace in the instance document.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unqualified&lt;/strong&gt;: means only globally declared elements must be qualified with there namespace and not the local elements.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;17.&lt;/span&gt;&lt;strong&gt;What is XML parser?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;An XML parser is a piece of software which can do following:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Check for well-formedness&lt;/li&gt;
&lt;li&gt;Validate the document&lt;/li&gt;
&lt;li&gt;Allows us to read, create or modify existing XML documents&lt;/li&gt;
&lt;/ul&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&lt;strong&gt;Note&lt;/strong&gt;:&amp;nbsp;&lt;em&gt;Parser is piece of software provided by vendors. An XML parser is built in Java runtime from JDK 1.4 onwards&lt;/em&gt;&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;18.&lt;/span&gt;&lt;strong&gt;What is DOM&lt;/strong&gt;?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;The Document Object Model (&lt;strong&gt;DOM&lt;/strong&gt;) is a platform and language-independent standard object model for representing XML and related formats. DOM is standard API which is not specific to any programming language. DOM represents an XML document as a tree model. The tree model makes the XML document hierarchal by nature. Each and every construct of the XML document is represented as a node in the tree.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;19.&lt;/span&gt;&lt;strong&gt;What is SAX?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;SAX-Simple API for XML processing. SAX provides a mechanism for reading data from an XML document. It is a popular alternative to the Document Object Model (DOM).SAX provides an event based processing approach unlike DOM which is tree based.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;20.&lt;/span&gt;&lt;strong&gt;What are the interfaces of SAX?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;The interfaces of SAX are:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;&lt;strong&gt;DocumentHandler&lt;/strong&gt;- is used for getting event notification relating to a document.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DTDHandler&lt;/strong&gt;- is implemented to get the notifications related to declarations in DTD like entities and notations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;EntityResolver&lt;/strong&gt;- is used for reading external entities.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ErrorHandler&lt;/strong&gt;- is used for handling error related notifications.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;21.&lt;/span&gt;&lt;strong&gt;What is the difference between SAX parser and DOM parser?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&lt;/div&gt;&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;5&quot; class=&quot;mytable&quot; style=&quot;border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-collapse: collapse; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; width: 788px;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;th style=&quot;background-color: #eff3f7; border-bottom-color: rgb(173, 210, 226); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(173, 210, 226); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(173, 210, 226); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(173, 210, 226); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot; width=&quot;50%&quot;&gt;&lt;strong&gt;SAX&lt;/strong&gt;&lt;/th&gt;&lt;th style=&quot;background-color: #eff3f7; border-bottom-color: rgb(173, 210, 226); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(173, 210, 226); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(173, 210, 226); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(173, 210, 226); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot; width=&quot;50%&quot;&gt;&lt;strong&gt;DOM&lt;/strong&gt;&lt;/th&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;A SAX parser takes the occurrences of components of an input document as events (i.e., event based processing), and tells the client what it reads as it reads through the input document.&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;A DOM parser creates a tree structure in memory from an input document and then waits for requests from client.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td style=&quot;background-color: #fafafa; border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;No navigation possible (top to bottom only once)&lt;/td&gt;&lt;td style=&quot;background-color: #fafafa; border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;Whereas, we can navigate the DOM tree in any direction, any no. of times.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;We cannot modify the document content in SAX&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;We can modify the document content in DOM&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td style=&quot;background-color: #fafafa; border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;A SAX parser serves the client application always only with pieces of the document at any given time.&lt;/td&gt;&lt;td style=&quot;background-color: #fafafa; border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;A DOM parser always serves the client application with the entire document no matter how much is actually needed by the client.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;odd&quot;&gt;&lt;td style=&quot;border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;A SAX parser, however, is much more space efficient in case of a big input document&lt;/td&gt;&lt;td style=&quot;border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;A DOM parser is space inefficient when the document is huge.&lt;/td&gt;&lt;/tr&gt;
&lt;tr class=&quot;even&quot;&gt;&lt;td style=&quot;background-color: #fafafa; border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;Use SAX parser when&lt;br /&gt;
&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Input document is too big for available memory.&lt;/li&gt;
&lt;li&gt;When only a part of the document is to be read and we create the data structures of our own.&lt;/li&gt;
&lt;li&gt;If you use SAX, you are using much less memory and performing much less dynamic memory allocation.&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #fafafa; border-bottom-color: rgb(239, 239, 239); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(239, 239, 239); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(239, 239, 239); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(239, 239, 239); border-top-style: solid; border-top-width: 1px; padding-bottom: 4px; padding-left: 4px; padding-right: 4px; padding-top: 4px;&quot;&gt;Use DOM when&lt;br /&gt;
&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;Your application has to access various parts of the document and using your own structure is just as complicated as the DOM tree.&lt;/li&gt;
&lt;li&gt;Your application has to change the tree very frequently and data has to be stored for a significant amount of time.&lt;/li&gt;
&lt;/ul&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;22.&lt;/span&gt;&lt;strong&gt;What is a CDATA section in XML?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;CDATA Sections are used to escape blocks of text containing characters which would otherwise be recognized as markup. All tags and entity references are ignored by an XML processor that treats them just like any character data. CDATA blocks have been provided as a convenience measure when you want to include large blocks of special characters as character data, but you do not want to have to use entity references all the time.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;23.&lt;/span&gt;&lt;strong&gt;What is XSL?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;e&lt;strong&gt;X&lt;/strong&gt;tensible&amp;nbsp;&lt;strong&gt;S&lt;/strong&gt;tylesheet&amp;nbsp;&lt;strong&gt;L&lt;/strong&gt;anguage(&lt;strong&gt;XSL&lt;/strong&gt;) &amp;nbsp;deals with most displaying the contents of XML documents.XSL consists of three parts:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;XSLT - a language for transforming XML documents&lt;/li&gt;
&lt;li&gt;XPath - a language for navigating in XML documents&lt;/li&gt;
&lt;li&gt;XSL-FO - a language for formatting XML documents&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;24.&lt;/span&gt;&lt;strong&gt;How is XSL different from Cascading Style Sheets? Why is a new Stylesheet language needed?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;XSL is compatible with CSS and is designed to handle the new capabilities of XML that CSS can&#39;t handle. XSL is derived from Document Style Semantics and Specification Language (DSSSL), a complex Stylesheet language with roots in the SGML community. The syntax of XSL is quite different from CSS, which could be used to display simple XML data but isn&#39;t general enough to handle all the possibilities generated by XML. XSL adds the capability to handle these possibilities. For instance, CSS cannot add new items or generated text (for instance, to assign a purchase order number) or add a footer (such as an order confirmation). XSL allows for these capabilities.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;25.&lt;/span&gt;&lt;strong&gt;What is XSLT?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;eXtensible Stylesheet Language Transformation (XSLT) deals with transformation of one XML document into XHTML documents or to other XML documents. XSLT uses XPath for traversing an XML document and arriving at a particular node.&lt;/div&gt;&lt;div align=&quot;center&quot;&gt;&lt;img align=&quot;middle&quot; alt=&quot;XSLT &quot; border=&quot;0&quot; height=&quot;286&quot; src=&quot;http://www.developersbook.com/xml/images/XSLT.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot; class=&quot;title&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold;&quot;&gt;Figure 3: XSLT&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;26.&lt;/span&gt;&lt;strong&gt;What is the role of XSL transformer?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;An XSL transformer will transform in the following way:&lt;/div&gt;&lt;ul style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; list-style-image: url(http://www.developersbook.com/images/redarrow.gif); list-style-position: outside; margin-bottom: 0em; margin-top: 0em;&quot;&gt;&lt;li&gt;The source tree is obtained by parsing in a normal XML style&lt;/li&gt;
&lt;li&gt;The transformation is now applied to the source with the help of information available in Stylesheet.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;27.&lt;/span&gt;What is the structure of XSLT?&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;&lt;img align=&quot;middle&quot; alt=&quot;XSLT Structure&quot; border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://www.developersbook.com/xml/images/XSLT-structure.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot; class=&quot;title&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold;&quot;&gt;Figure 4: XSLT Structure&lt;/div&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;28.&lt;/span&gt;&lt;strong&gt;What is XSL template?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;Template specifies transformation rules. A Stylesheet document can be made up of at least one template, which acts as an entry point. Every template uniquely identifies a particular node in the source tree.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px; font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 13px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 6px; -webkit-border-vertical-spacing: 6px; color: black; font-family: &#39;Times New Roman&#39;; font-size: medium;&quot;&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;strong&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;29.&lt;/span&gt;&lt;strong&gt;What is XPath?&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;XPath is an expression language used for addressing parts of an XML document.&amp;nbsp; XPath is used to navigate through elements and attributes in an XML document.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;30.&lt;/span&gt;&lt;strong&gt;What is XSL-FO?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;XSL-FO&amp;nbsp;&amp;nbsp; deals with formatting XML data. This can be used for generating output in a particular format like XML to PDF, XML to DOC, etc.&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;---------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;que&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold; margin-bottom: 4px; margin-top: 4px;&quot;&gt;&lt;span class=&quot;queIndex&quot; style=&quot;font-size: 13px; padding-right: 3px;&quot;&gt;31.&lt;/span&gt;&lt;strong&gt;How XSL-FO Works (or) How would you produce PDF output using XSL’s?&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;justify&quot; class=&quot;content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; margin-bottom: 4px; margin-top: 4px; padding-left: 20px;&quot;&gt;&lt;/div&gt;&lt;div align=&quot;center&quot;&gt;&lt;img align=&quot;middle&quot; alt=&quot;XSLT FO&quot; border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://www.developersbook.com/xml/images/XSL-FO.gif&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px;&quot; width=&quot;364&quot; /&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot; class=&quot;title&quot; style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: 16px; font-weight: bold;&quot;&gt;Figure 5: XSL-FO&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/367960865104729373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/367960865104729373'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/04/xml.html' title='XML Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-8878879254107575161</id><published>2010-04-30T20:41:00.000-07:00</published><updated>2010-04-30T20:42:32.790-07:00</updated><title type='text'>RMI Answers</title><content type='html'>1. &amp;nbsp;What is RMI?&lt;br /&gt;
Answer:&amp;nbsp;&lt;i&gt;Java Remote Method Invocation&lt;/i&gt; (Java RMI) enables the programmer to create distributed Java technology-based to Java technology-based applications, in which the methods of remote Java objects can be invoked from other Java virtual machines, possibly on different hosts. RMI uses object serialization to marshal and unmarshal parameters and does not truncate types, supporting true object-oriented polymorphism.&lt;br /&gt;
-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
2.&amp;nbsp;How many types of protocol implementations does RMI have?&lt;br /&gt;
Answer: &amp;nbsp;RMI has at least three protocol implementations:&lt;br /&gt;
- Java Remote Method&amp;nbsp;Protocol(JRMP),&lt;br /&gt;
- Internet Inter ORB Protocol(IIOP),&lt;br /&gt;
- Jini Extensible&amp;nbsp;Remote Invocation(JERI).&lt;br /&gt;
These are alternatives, not part of the same&amp;nbsp;thing, All three are indeed layer 6 protocols from the earlier&amp;nbsp;OSI reference model.&lt;br /&gt;
-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
3. Does RMI-IIOP support dynamic downloading of classes?&lt;br /&gt;
Answer:&amp;nbsp;No, RMI-IIOP doesn&#39;t support dynamic downloading of the classes as it is&amp;nbsp;done with CORBA in DII (Dynamic Interface Invocation).Actually RMI-IIOP&amp;nbsp;combines the usability of Java Remote Method Invocation (RMI) with the&amp;nbsp;interoperability of the Internet Inter-ORB Protocol (IIOP).So in order to&amp;nbsp;attain this interoperability between RMI and CORBA,some of the features&amp;nbsp;that are supported by RMI but not CORBA and vice versa are eliminated&amp;nbsp;from the RMI-IIOP specification.&lt;br /&gt;
-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
4.&amp;nbsp;Does RMI-IIOP support code downloading for Java objects sent by value&amp;nbsp;across an IIOP connection in the same way as RMI does across a JRMP&amp;nbsp;connection?&lt;br /&gt;
Answer: Yes. The JDK 1.2 support the dynamic class loading.&lt;br /&gt;
-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
5. Can RMI and Corba based applications interact ?&lt;br /&gt;
Answer Yes they can. RMI is available with IIOP as the transport protocol instead&amp;nbsp;of JRMP.&lt;br /&gt;
-&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
6.&amp;nbsp;Assume an application needs security permissions granted before the&amp;nbsp;application can talk to the database. How&amp;nbsp;do you go about setting the permissions? Give an example of setting the&amp;nbsp;permission in Tomcat and stand alone&amp;nbsp;java program.&lt;br /&gt;
Answer:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;In Tomcat:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Add security permission to catalina.policy file located under&amp;nbsp;&lt;tomcat_home&gt;/conf/&amp;nbsp;&lt;/tomcat_home&gt;&lt;br /&gt;
Add the following lines:&lt;br /&gt;
&amp;nbsp;grant codeBase &quot;file:${catalina.home}/webapps/MyContext/-&quot;&lt;br /&gt;
{&lt;br /&gt;
permission java.security.AllPermission;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;text-decoration: underline;&quot;&gt;In stand alone java application:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
Create a .policy file that points to the code base where the application&amp;nbsp;resides.&lt;br /&gt;
grant codebase &quot;file:c:/source/java/-&quot;&lt;br /&gt;
{&lt;br /&gt;
permission java.security.AllPermission;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
java -Djava.security.policy=&lt;file name=&quot;&quot;&gt;.policy com.test.MyClass&lt;/file&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/8878879254107575161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/8878879254107575161'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/04/rmi.html' title='RMI Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-4773929348720495551</id><published>2010-04-30T10:19:00.000-07:00</published><updated>2010-05-16T13:40:50.557-07:00</updated><title type='text'>JMS Answers</title><content type='html'>&lt;a href=&quot;http://java.sun.com/products/jms/tutorial/1_3_1-fcs/doc/jms_tutorialTOC.html&quot; target=&quot;new&quot;&gt;Click Here for a tutorial on Java Messaging Services.&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1. How may messaging models does JMS provide for and what are&amp;nbsp;they?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;The Java Message Service (JMS) API is a messaging standard that allows application components based on the Java 2 Platform, Enterprise Edition (J2EE) to create, send, receive, and read messages. It enables distributed communication that is loosely coupled, reliable, and asynchronous.&lt;br /&gt;
&lt;br /&gt;
JMS provide for two messaging models:&lt;i&gt; publish-and-subscribe and point to-point queuing.&lt;/i&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;2. What is messaging?&lt;/b&gt;&lt;br /&gt;
Answer: Messaging is a mechanism by which data can be passed from one&amp;nbsp;application to another application.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;3. What is point-to-point messaging?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;With point-to-point message passing the sending application/client&amp;nbsp;establishes a named message queue in the JMS broker/server and sends&amp;nbsp;messages to this queue. The receiving client registers with the broker to&amp;nbsp;receive messages posted to this queue. There is a one-to-one relationship&amp;nbsp;between the sending and receiving clients.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;4. &amp;nbsp;Can two different JMS services talk to each other? For instance, if A and&amp;nbsp;B are two different JMS providers, can Provider A send messages directly&amp;nbsp;to Provider B? If not, then can a subscriber to Provider A act as a&amp;nbsp;publisher to Provider B?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;The answers are NO to the first question and YES to the second.&lt;br /&gt;
&lt;br /&gt;
The JMS&amp;nbsp;specification does not require that one JMS provider be able to send&amp;nbsp;messages directly to another provider. However, the specification does&amp;nbsp;require that a JMS client must be able to accept a message created by a&amp;nbsp;different JMS provider, so a message received by a subscriber to Provider&amp;nbsp;A can then be published to Provider B. One caveat is that the publisher to&amp;nbsp;Provider B is not required to handle a JMSReplyTo header that refers to a&amp;nbsp;destination that is specific to Provider A.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;5. What is the advantage of persistent message delivery compared to&amp;nbsp;non-persistent delivery?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;If the JMS server experiences a failure, for example, a power outage,&amp;nbsp;any message that it is holding in primary storage potentially could be lost.&amp;nbsp;With persistent storage, the JMS server logs every message to secondary&amp;nbsp;storage. (The logging occurs on the front end, that is, as part of handling&amp;nbsp;the send operation from the message producing client.) The logged&amp;nbsp;message is removed from secondary storage only after it has been&amp;nbsp;successfully delivered to all consuming clients.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
6. How is a java object message delivered to a non-java Client?&lt;br /&gt;
Answer: &amp;nbsp;It is according to the specification that the message sent should be&amp;nbsp;received in the same format. A non-java client cannot receive a message&amp;nbsp;in the form of java object. The provider in between handles the conversion&amp;nbsp;of the data type and the message is transferred to the other end.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;7. &amp;nbsp;What is MDB and what is it special?&lt;/b&gt;&lt;br /&gt;
Answer: &amp;nbsp;MDB is Message driven bean, which very much resembles the Stateless&amp;nbsp;session bean. The incoming and out going messages can be handled by&amp;nbsp;the Message driven bean. The ability to communicate asynchronously is&amp;nbsp;the special feature about the Message driven bean.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;8. Give an example of using the publish/subscribe model.&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;JMS can be used to broadcast shutdown messages to clients connected&amp;nbsp;to the Weblogic server on a module wise basis. If an application has six&amp;nbsp;modules, each module behaves like a subscriber to a named topic on the&amp;nbsp;server.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;9. What is the difference between the Mailing and Messaging?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;Java Mailing is the set of APIs that primarily concerns with the sending of&amp;nbsp;Mail messages through the standard mail protocols. Messaging is the way&amp;nbsp;of communicating to the remote machines using Message Oriented&amp;nbsp;Middlewares. Message Oriented Middlewares do not use mailing internally&amp;nbsp;for communication. They create their own channels for communication.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;10. What are the types of messaging?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;There are two kinds of Messaging.&lt;br /&gt;
&lt;i&gt;&lt;b&gt;Synchronous Messaging:&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
Synchronous messaging involves a client that waits for the server to&amp;nbsp;respond to a message.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;Asynchronous Messaging:&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
Asynchronous messaging involves a client that does not wait for a&amp;nbsp;message from the server. An event is used to trigger a message from a&amp;nbsp;server.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;11. What is publish/subscribe messaging?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;With publish/subscribe message passing the sending application/client&amp;nbsp;establishes a named topic in the JMS broker/server and publishes&amp;nbsp;messages to this queue. The receiving clients register via the broker to messages by topic; every subscriber to a&amp;nbsp;topic receives each message published to that topic. There is a one-many&amp;nbsp;relationship between the publishing client and the subscribing&amp;nbsp;clients.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;12. Why doesn&#39;t the JMS API provide end-to-end synchronous message&amp;nbsp;delivery and notification of delivery?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;Some messaging systems provide synchronous delivery to destinations&amp;nbsp;as a mechanism for implementing reliable applications. Some systems&amp;nbsp;provide clients with various forms of delivery notification so that the&amp;nbsp;clients can detect dropped or ignored messages. This is not the model&amp;nbsp;defined by the JMS API.&lt;br /&gt;
&lt;br /&gt;
JMS API messaging provides guaranteed delivery via the once-and-only once&amp;nbsp;delivery semantics of &lt;b&gt;persistent messages.&lt;/b&gt; In addition, message&amp;nbsp;consumers can insure reliable processing of messages by using either&amp;nbsp;CLIENT_ACKNOWLEDGE mode or transacted sessions. This achieves&amp;nbsp;reliable delivery with minimum synchronization and is the enterprise&amp;nbsp;messaging model most vendors and developers prefer.&lt;br /&gt;
The JMS API does not define a schema of systems messages (such as&amp;nbsp;delivery notifications). If an application requires acknowledgment of&amp;nbsp;message receipt, it can define an application-level acknowledgment&amp;nbsp;message.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;13. What are the core JMS-related objects required for each JMS-enabled&amp;nbsp;application?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;Each JMS-enabled client must establish the following:&lt;br /&gt;
- A &lt;i&gt;connection object&lt;/i&gt; provided by the JMS server (the message broker).&lt;br /&gt;
- Within a connection, one or more &lt;i&gt;sessions&lt;/i&gt;, which provide a context for&amp;nbsp;message sending and receiving.&lt;br /&gt;
- Within a session, either a queue or &lt;i&gt;topic object&lt;/i&gt; representing the&amp;nbsp;destination (the message staging area) within the message broker.&lt;br /&gt;
- Within a session, the appropriate &lt;i&gt;sender or publisher or receiver or&amp;nbsp;subscriber object&lt;/i&gt; (depending on whether the client is a message producer&amp;nbsp;or consumer and uses a point-to-point or publish/subscribe strategy,&amp;nbsp;respectively).&lt;br /&gt;
-Within a session, a &lt;i&gt;message object &lt;/i&gt;(to send or to receive).&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;14. What are the various message types supported by JMS?&lt;/b&gt;&lt;br /&gt;
Answer:&lt;br /&gt;
&lt;b&gt;-Stream Messages:&lt;/b&gt; Group of Java Primitives&lt;br /&gt;
&lt;b&gt;-Map Messages:&lt;/b&gt;&amp;nbsp;Name Value Pairs.&lt;br /&gt;
-Name being a string&lt;br /&gt;
-Value being a java primitive&lt;br /&gt;
&lt;b&gt;-Text Messages:&lt;/b&gt;&amp;nbsp;&amp;nbsp;String messages (since being widely used a separate&amp;nbsp;messaging Type has been supported)&lt;br /&gt;
&lt;b&gt;Object Messages:&lt;/b&gt;&amp;nbsp;&amp;nbsp;Group of serialize able java object&lt;br /&gt;
&lt;b&gt;Bytes Message:&lt;/b&gt;&amp;nbsp;Stream of uninterrupted bytes.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;15. &amp;nbsp;What is the role of the JMS Provider?&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;The JMS provider handles security of the messages, data conversion and&amp;nbsp;the client triggering. The JMS provider specifies the level of encryption&amp;nbsp;and the security level of the message, the best data type for the non-JMS&amp;nbsp;client.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;16. &amp;nbsp;How does a typical client perform the communication?&lt;/b&gt;&lt;br /&gt;
Answer:&lt;br /&gt;
1. Use JNDI to locate administrative objects.&lt;br /&gt;
1a. Locate a single ConnectionFactory object.&lt;br /&gt;
1b. Locate one or more Destination objects.&lt;br /&gt;
2. Use the ConnectionFactory to create a JMS Connection.&lt;br /&gt;
3. Use the Connection to create one or more Session(s).&lt;br /&gt;
4. Use a Session and the Destinations to create the MessageProducers and&amp;nbsp;MessageConsumers needed.&lt;br /&gt;
5. Perform your communication.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;17.Give an example of using the point-to-point model.&lt;/b&gt;&lt;br /&gt;
Answer:&amp;nbsp;The point-to-point model is used when the information is specific to a&amp;nbsp;single client. For example, a client can send a message for a print out, and&amp;nbsp;the server can send information back to this client after completion of the&amp;nbsp;print job.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: 13px;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;18. Question How does the application server handle the JMS Connection?&lt;/b&gt;&lt;br /&gt;
Answer:&lt;br /&gt;
-&amp;nbsp;Application&amp;nbsp;server creates the server session and stores them in a pool.&lt;br /&gt;
- Connection consumer uses the server session to put messages in the&amp;nbsp;session of the JMS.&lt;br /&gt;
- Server session is the one that spawns the JMS session.&lt;br /&gt;
- Applications written by application programmers creates the message&amp;nbsp;listener.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/4773929348720495551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/4773929348720495551'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/04/jms.html' title='JMS Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-6986964690114166411</id><published>2010-04-30T09:59:00.000-07:00</published><updated>2010-05-16T11:55:45.272-07:00</updated><title type='text'>JTA Answers</title><content type='html'>&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;1. What is JTA?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Answer: Java Transaction API (JTA) specifies standard Java interfaces between a transaction manager and the parties involved in a distributed transaction system: the resource manager, the application server, and the transactional applications.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;2. Why would a client application use JTA transactions?&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;Answer:&amp;nbsp;One possible example would be a scenario in which a client needs to&amp;nbsp;employ two (or more) session beans, where each session bean is&amp;nbsp;deployed on a different EJB server and each bean performs operations&amp;nbsp;against external resources (for example, a database) and/or is managing&amp;nbsp;one or more entity beans. In this scenario, the client&#39;s logic could required&amp;nbsp;an all-or-nothing guarantee for the operations performed by the session&amp;nbsp;beans; hence, the session bean usage could be bundled together with a&amp;nbsp;JTA UserTransaction object.&lt;br /&gt;
&lt;br /&gt;
In the previous scenario, however, the client application developer should&amp;nbsp;address the question of whether or not it would be better to encapsulate&amp;nbsp;these operations in yet another session bean, and allow the session bean&amp;nbsp;to handle the transactions via the EJB container. In general, lightweight&amp;nbsp;clients are easier to maintain than heavyweight clients. Also, EJB&amp;nbsp;environments are ideally suited for transaction management.&lt;br /&gt;
&lt;br /&gt;
Context c = new InitialContext(); UserTransaction ut =&amp;nbsp;(UserTransaction) c.lookup(&quot;java:comp/UserTransaction&quot;);&lt;br /&gt;
ut.begin(); // perform multiple operations...&lt;br /&gt;
ut.comm&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/6986964690114166411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/6986964690114166411'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/04/jta.html' title='JTA Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-8375021866042485646</id><published>2010-04-30T09:25:00.000-07:00</published><updated>2010-05-15T19:06:02.185-07:00</updated><title type='text'>JNDI Answers</title><content type='html'>1. &amp;nbsp;What is JNDI?&lt;br /&gt;
Answer:&amp;nbsp;The &lt;i&gt;&lt;b&gt;Java Naming and Directory Interface &lt;/b&gt;&lt;/i&gt;(JNDI) is part of the Java platform, providing applications based on Java technology with a unified interface to multiple naming and directory services.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
2.What protocols does JNDI provide an interface to?&lt;br /&gt;
Answer:&amp;nbsp;JNDI itself is independent of any specific directory access protocol.&amp;nbsp;Individual service providers determine the protocols to support. JNDI&amp;nbsp;supports popular protocols, such as LDAP (Light weight Directory Access&amp;nbsp;Protocol) , NDS(Netscape Directory Service), DNS(Domain Naming&amp;nbsp;Service), and NIS(Network Information Service), supplied by different&amp;nbsp;vendors.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
3. What is Context and InitialContext?&lt;br /&gt;
Answer:&amp;nbsp;A &lt;i&gt;context&lt;/i&gt; represents a set of bindings within a naming service. A context object provides the methods for binding names to objects and &amp;nbsp;unbinding names from objects, for renaming objects, and for listing the&amp;nbsp;bindings. JNDI performs all naming operations relative to a context.&lt;br /&gt;
&amp;nbsp;The JNDI specification defines an &lt;i&gt;InitialContext&lt;/i&gt; class. This class is&amp;nbsp;instantiated with properties that define the type of naming service in use&amp;nbsp;(such as provider URL, security, ID and password to use when&amp;nbsp;connecting).&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
4. What&#39;s the difference between JNDI lookup(), list(), listBindings(), and&amp;nbsp;search()?&lt;br /&gt;
Answer:&lt;br /&gt;
&lt;i&gt;&lt;b&gt;-lookup()&lt;/b&gt;&lt;/i&gt; attempts to find the specified object in the given context.&lt;br /&gt;
i.e., it&amp;nbsp;looks for a single, specific object and either finds it in the current context&amp;nbsp;or it fails.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-list() &lt;/i&gt;&lt;/b&gt;attempts to return an enumeration of all of the Name-ClassPair&#39;s of&amp;nbsp;all of the objects in the current context. i.e., it&#39;s a listing of all of the&amp;nbsp;objects in the current context but only returns the object&#39;s name and the&lt;br /&gt;
name of the class to which the object belongs.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-listBindings&lt;/i&gt;()&lt;/b&gt; attempts to return an enumeration of the Binding&#39;s of all of&amp;nbsp;the objects in the current context. i.e., it&#39;s a listing of all of the objects in&amp;nbsp;the current context with the object&#39;s name, its class name, and a&amp;nbsp;reference to the object itself.&lt;br /&gt;
&lt;b&gt;&lt;i&gt;-search() &lt;/i&gt;&lt;/b&gt;attempts to return an enumeration of all of the objects matching&amp;nbsp;a given set of search criteria. It can search across multiple contexts (or&amp;nbsp;not). It can return whatever attributes of the objects that you desire.&amp;nbsp;It&#39;s by far the most complex and powerful of these options but is also the&amp;nbsp;most expensive.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
5. Name the components of JNDI.&lt;br /&gt;
Answer:&lt;br /&gt;
&lt;b&gt;Naming Interface-&lt;/b&gt; The naming interface organizes information&amp;nbsp;hierarchically and maps human-friendly names to addresses or objects&amp;nbsp;that are machine-friendly. It allows access to named objects through&amp;nbsp;multiple namespaces.&lt;br /&gt;
&lt;b&gt;Directory Interface-&lt;/b&gt; JNDI includes a directory service interface that&amp;nbsp;provides access to directory objects,which can contain attributes, thereby&amp;nbsp;providing attribute-based searching and schema support.&lt;br /&gt;
&lt;b&gt;Service Provider Interface-&lt;/b&gt; JNDI comes with the SPI, which supports the&amp;nbsp;protocols provided by third parties.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #29303b; font-family: Georgia, &#39;Times New Roman&#39;, sans-serif; font-size: small;&quot;&gt;-----------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;
6. Is JNDI a protocol? Where is it used?&lt;br /&gt;
Answer: &lt;i&gt;Yes. JNDI is a protocol.&lt;/i&gt;&lt;br /&gt;
-HotJava Views 1.1 is using JNDI to access LDAP.&lt;br /&gt;
-Enterprise APIs such&amp;nbsp;as Enterprise JavaBeans, Java Message Service, JDBC 2.0 make use of&amp;nbsp;JNDI to for their naming and directory needs.&lt;br /&gt;
-RMI over IIOP applications&amp;nbsp;can use JNDI to access the CORBA (COS) naming service.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/8375021866042485646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/8375021866042485646'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/04/jndi.html' title='JNDI Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-4113655829883004086.post-6966154299898096646</id><published>2010-04-30T09:12:00.001-07:00</published><updated>2010-04-30T09:47:47.645-07:00</updated><title type='text'>JNI Answers</title><content type='html'>1. What are native methods? How do you use them?&lt;br /&gt;
Answer:&amp;nbsp;Native methods are methods written in other languages like C, C++, or&amp;nbsp;even assembly language.&amp;nbsp;You can call native methods from Java using JNI.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/6966154299898096646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4113655829883004086/posts/default/6966154299898096646'/><link rel='alternate' type='text/html' href='http://java-interview-answers.blogspot.com/2010/04/jni.html' title='JNI Answers'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>