<?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: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-3379551909861305957</id><updated>2011-12-15T04:31:26.689-08:00</updated><title type='text'>.:: Welcome to Beginner's Discussion Portrait ::.</title><subtitle type='html'>Discuss about Java Programming</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://charithabuddhika.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3379551909861305957/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://charithabuddhika.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Charitha Buddhika</name><uri>http://www.blogger.com/profile/01853994240081596098</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://4.bp.blogspot.com/_Q2ZvLUOUI7U/SmwheMnhRPI/AAAAAAAAAKM/LPiVSzv-5lw/S220/DSC00229.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3379551909861305957.post-3440980188850265168</id><published>2009-07-26T12:40:00.000-07:00</published><updated>2009-07-26T13:07:32.155-07:00</updated><title type='text'>Java Operators</title><content type='html'>Learning the operators of the Java programming language is a good place to start.&lt;br /&gt;An operator is a function that has a special symbol and is invoked by using that symbol with an expression.&lt;br /&gt;&lt;br /&gt;There are several operators in Java that we using to code.&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;* Arithmetic Operators&lt;/span&gt;&lt;br /&gt;      perform addition(+), subtraction(-), multiplication(*), and division(/). &lt;br /&gt;      There's a good chance you'll recognize them by their counterparts in basic &lt;br /&gt;      mathematics. The only symbol that might look new to you is "%", which divides &lt;br /&gt;      one operand by another and returns the remainder as its result. &lt;br /&gt;&lt;font color="Red"&gt;&lt;br /&gt;      Example Program for Arithmetic Operators:&lt;br /&gt;&lt;br /&gt;      class ArithmeticOperators {&lt;br /&gt;      public static void main (String[] args){&lt;br /&gt;          &lt;br /&gt;          int result = 1 + 2; // result is now 3&lt;br /&gt;          System.out.println(result);&lt;br /&gt;&lt;br /&gt;          result = result - 1; // result is now 2&lt;br /&gt;          System.out.println(result);&lt;br /&gt;&lt;br /&gt;          result = result * 2; // result is now 4&lt;br /&gt;          System.out.println(result);&lt;br /&gt;&lt;br /&gt;          result = result / 2; // result is now 2&lt;br /&gt;          System.out.println(result);&lt;br /&gt;&lt;br /&gt;          result = result + 8; // result is now 10&lt;br /&gt;          result = result % 7; // result is now 3&lt;br /&gt;          System.out.println(result);&lt;br /&gt;&lt;br /&gt;          }&lt;br /&gt;     }&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;* Assignment Operator&lt;/span&gt;&lt;br /&gt;      Used to assign a variable with a value. You can also combine the arithmetic &lt;br /&gt;      operators with the simple assignment operator to create compound assignments. &lt;br /&gt;      For example, x+=1; and x=x+1; both increment the value of x by 1. &lt;br /&gt;&lt;font color="Red"&gt;&lt;br /&gt;      Example Program for Assignment Operators:&lt;br /&gt;&lt;br /&gt;      class AssignmentOperator {&lt;br /&gt;      public static void main(String[] args){&lt;br /&gt;          String firstString = "This is";&lt;br /&gt;          String secondString = " a concatenated string.";&lt;br /&gt;          String thirdString = firstString+secondString;&lt;br /&gt;          System.out.println(thirdString);&lt;br /&gt;          }&lt;br /&gt;      }&lt;br /&gt;      By the end of this program, the variable thirdString contains &lt;span style="font-weight:bold;"&gt;"This is a concatenated string."&lt;/span&gt;, which gets printed to standard output. &lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-weight:bold;"&gt; * Logical (Boolean) Operators&lt;/span&gt;&lt;br /&gt;      Used to perform standard logical operations on Boolean values&lt;br /&gt;&lt;br /&gt;      &amp;&amp;&lt;br /&gt;      Logical-AND&lt;br /&gt;&lt;br /&gt;      ||&lt;br /&gt;      Logical-OR    &lt;br /&gt;&lt;br /&gt;      !&lt;br /&gt;      Logical-NOT&lt;br /&gt;&lt;br /&gt;    &lt;span style="font-weight:bold;"&gt;* Relational Operators&lt;/span&gt;&lt;br /&gt;      Relational operators determine if one operand is greater than, less than, &lt;br /&gt;      equal to, or not equal to another operand. The majority of these operators &lt;br /&gt;      will probably look familiar to you as well. Keep in mind that you must use &lt;br /&gt;      "==", not "=", when testing if two primitive values are equal. &lt;br /&gt;&lt;br /&gt;      == equal to                    Ex: 2==3 =False&lt;br /&gt;      != not equal to                Ex: 2!=3 =True&lt;br /&gt;      &gt;         greater than                Ex: 2&gt;3  =False&lt;br /&gt;      &gt;= greater than or equal to    EX: 2&gt;=3 =False&lt;br /&gt;      &lt;         less than                   Ex: 2&lt;3  =True&lt;br /&gt;      &lt;= less than or equal to       Ex: 2&lt;=3 =True&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-weight:bold;"&gt; * Conditional Operators&lt;/span&gt;&lt;br /&gt;      Act as a shorthand for if-then-else &lt;br /&gt;&lt;br /&gt;      Conditional Operator ?:&lt;br /&gt;&lt;br /&gt;      This Operator has the form:&lt;br /&gt;     (condition)?(value if true):(value if false)&lt;br /&gt;&lt;br /&gt;      The condition is evaluated, and if it is true value if true is returned,    &lt;br /&gt;      otherwise value if false is returned.&lt;br /&gt;&lt;br /&gt;      Example :&lt;br /&gt;&lt;br /&gt;      If a=10 and b=2 were integers, the following would return 10.&lt;br /&gt;      (a&gt;b)?a:b&lt;br /&gt;&lt;br /&gt;      Conditional Operator is a short hand operator for "if-then-else"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3379551909861305957-3440980188850265168?l=charithabuddhika.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://charithabuddhika.blogspot.com/feeds/3440980188850265168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3379551909861305957&amp;postID=3440980188850265168' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3379551909861305957/posts/default/3440980188850265168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3379551909861305957/posts/default/3440980188850265168'/><link rel='alternate' type='text/html' href='http://charithabuddhika.blogspot.com/2009/07/java-operators.html' title='Java Operators'/><author><name>Charitha Buddhika</name><uri>http://www.blogger.com/profile/01853994240081596098</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='26' src='http://4.bp.blogspot.com/_Q2ZvLUOUI7U/SmwheMnhRPI/AAAAAAAAAKM/LPiVSzv-5lw/S220/DSC00229.JPG'/></author><thr:total>1</thr:total></entry></feed>
