List of Java keywords: Difference between revisions

Content deleted Content added
SmackBot (talk | contribs)
m Date maintenance tags and general fixes
fix grammatical error that I made
Line 12:
 
;<code>[[Boolean datatype#Java|boolean]]</code>
:The <code>boolean</code> keyword is used to declare a [[field (computer science)|field]] that can store a [[boolean datatype|boolean value]]; that is, either <code>true</code> or <code>false</code>.<ref name="primitive">{{cite web |title=Primitive Data Types |url=http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html |work=The Java Tutorials |publisher=Sun Microsystems, Inc. |date=February 14, 2008 |accessdate=2008-12-03}}</ref> This keyword is also be used to declare that a method returns a value of type <code>boolean</code>.<ref name="return">{{cite web |title=Returning a Value from a Method |url=http://java.sun.com/docs/books/tutorial/java/javaOO/returnvalue.html |work=The Java Tutorials |publisher=Sun Microsystems, Inc. |date=February 14, 2008 |accessdate=2008-12-03}}</ref>
 
;<code>[[Switch statement#Java|break]]</code>
Line 18:
 
;<code>[[byte]]</code>
:The <code>byte</code> keyword is used to declare a field that can store an 8-[[bit]] signed [[two's complement]] integer.<ref name="primitive" /> This keyword is also be used to declare that a method returns a value of type <code>byte</code>.<ref name="return" />
 
;<code id="case">[[Switch statement#Java|case]]</code>
Line 27:
 
;<code>[[Character (computing)|char]]</code>
:The <code>char</code> keyword is used to declare a field that can store a 16-bit [[Unicode]] character.<ref name="primitive" /> This keyword is also be used to declare that a method returns a value of type <code>char</code>.<ref name="return" />
 
;<code>[[Class (computer science)#Java|class]]</code>