<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SCJP Certification &#187; questions</title>
	<atom:link href="http://www.scjp-certification.com/tag/questions/feed" rel="self" type="application/rss+xml" />
	<link>http://www.scjp-certification.com</link>
	<description>Sun Certified Java Programmer Certification exam essentials</description>
	<lastBuildDate>Fri, 30 Sep 2011 05:54:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>What are the getTime() and setTime() method?</title>
		<link>http://www.scjp-certification.com/what-are-the-gettime-and-settime-method.html</link>
		<comments>http://www.scjp-certification.com/what-are-the-gettime-and-settime-method.html#comments</comments>
		<pubDate>Fri, 27 Nov 2009 11:54:35 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[exam guide]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[method]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[SCJP]]></category>
		<category><![CDATA[study guide]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=447</guid>
		<description><![CDATA[getTime(): The getTime() method returns a date/time of the calendar in a Date object. Date objects are stored as an...]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-gettime-and-settime-method.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-gettime-and-settime-method.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>getTime():</strong> The getTime() method returns a date/time of the calendar in a Date object. Date objects are stored as an offset in milliseconds. The general form of the getTime() method is as follows: </p>
<p>Date getTime()</p>
<p>e.g. System.out.println(calendar.getTime());</p>
<p><strong>setTime(): </strong>The setTime() method sets the current calendar&#8217;s date/time from the value of the specified date. The general form of the setTime() method is as follows:</p>
<p>void setTime(Date date)</p>
<p>e.g. calendar.setTime(date2);  </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-gettime-and-settime-method.html&amp;title=What%20are%20the%20getTime%28%29%20and%20setTime%28%29%20method%3F"><img src="http://www.scjp-certification.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.scjp-certification.com/what-are-the-gettime-and-settime-method.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What will be the output of the following program code?</title>
		<link>http://www.scjp-certification.com/what-will-be-the-output-of-the-following-program-code.html</link>
		<comments>http://www.scjp-certification.com/what-will-be-the-output-of-the-following-program-code.html#comments</comments>
		<pubDate>Mon, 23 Nov 2009 11:59:31 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Questions]]></category>
		<category><![CDATA[break]]></category>
		<category><![CDATA[exam guide]]></category>
		<category><![CDATA[program code]]></category>
		<category><![CDATA[questions]]></category>
		<category><![CDATA[study guide]]></category>
		<category><![CDATA[switch]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=437</guid>
		<description><![CDATA[class Ques0357{ public static void main(String[] argv){ int s = 2; switch (s) { case 1: System.out.println(&#8220;Fred&#8221;); break; case 2:...]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-will-be-the-output-of-the-following-program-code.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-will-be-the-output-of-the-following-program-code.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>class Ques0357{<br />
   public static void main(String[] argv){<br />
       int s = 2;<br />
       switch (s) {<br />
          case 1:<br />
               System.out.println(&#8220;Fred&#8221;);<br />
               break;<br />
           case 2:<br />
               System.out.println(&#8220;Fast&#8221;);<br />
           case 3:<br />
               System.out.println(&#8220;Tech&#8221;);<br />
           default:<br />
               System.out.println(&#8220;default&#8221;);<br />
       }<br />
   }<br />
}</strong></p>
<p>The break statement is used inside the code block following the <a href="http://www.scjp-certification.com/the-switch-statement.html">switch</a> statement to terminate the execution of a statement sequence. As soon as a break statement is encountered, the program control is transferred to the first line of code that follows the entire switch statement.</p>
<p>In the given program, the argument to the switch statement is an int value 2. Therefore, the program control will be transferred at the matching case label, i.e., at line number 8. As there is no break statement after line number 7, the execution of the code will continue to fall through and all the statements after line number 8 will be executed. Therefore, the execution of the program will display Fast Tech default as the output. </p>
<p>http://www.scjp-certification.com/what-is-the-for-each-loop.html</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-will-be-the-output-of-the-following-program-code.html&amp;title=What%20will%20be%20the%20output%20of%20the%20following%20program%20code%3F"><img src="http://www.scjp-certification.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.scjp-certification.com/what-will-be-the-output-of-the-following-program-code.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

