{"id":65820,"date":"2021-07-15T04:10:07","date_gmt":"2021-07-15T08:10:07","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/scjp-java-operators-java-short-notes-scjp\/"},"modified":"2022-05-28T19:53:51","modified_gmt":"2022-05-28T23:53:51","slug":"scjp-java-operators-java-short-notes-scjp","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=65820","title":{"rendered":"SCJP: Java Operators #Java Short Notes #SCJP"},"content":{"rendered":"<p>Exams like SCJP test your understanding of Java operators and how to use them like: <br \/>assignment operators: =, +=, -=<br \/>arithmetic operators:  +, -, *, \/, %, ++, &#8212;<br \/>relational operators: &lt; , , &gt;=, ==, !=<br \/>logical operators: &amp;, |, ^, !, &amp;&amp;, ||<br \/>conditional operators: ? : <br \/>Also operators to check the equality of two objects or two primitives <\/p>\n<p>In the following table operators and their precedences are shown. Upper rows operators have higher precedence. Same row operators have equal precedence. For equal precedence operators, All binary operators except the assignment operators work from left to right while assignment operators work from right to left. <\/p>\n<table border cellpadding=\"5\">\n<caption id=\"nutsandbolts-precedence\"><strong>Operator Precedence<\/strong><\/caption>\n<tr>\n<th>Operators<\/th>\n<th>Precedence<\/th>\n<\/tr>\n<tr>\n<td>postfix<\/td>\n<td><code><em>expr<\/em>++ <em>expr<\/em>--<\/code><\/td>\n<\/tr>\n<tr>\n<td>unary<\/td>\n<td><code>++<em>expr<\/em> --<em>expr<\/em> +<em>expr<\/em> -<em>expr<\/em> ~ !<\/code><\/td>\n<\/tr>\n<tr>\n<td>multiplicative<\/td>\n<td><code>* \/ %<\/code><\/td>\n<\/tr>\n<tr>\n<td>additive<\/td>\n<td><code>+ -<\/code><\/td>\n<\/tr>\n<tr>\n<td>shift<\/td>\n<td><code>&lt; &gt; &gt;&gt;&gt;<\/code><\/td>\n<\/tr>\n<tr>\n<td>relational<\/td>\n<td><code> = instanceof<\/code><\/td>\n<\/tr>\n<tr>\n<td>equality<\/td>\n<td><code>== !=<\/code><\/td>\n<\/tr>\n<tr>\n<td>bitwise AND<\/td>\n<td><code>&amp;<\/code><\/td>\n<\/tr>\n<tr>\n<td>bitwise exclusive OR<\/td>\n<td><code>^<\/code><\/td>\n<\/tr>\n<tr>\n<td>bitwise inclusive OR<\/td>\n<td><code>|<\/code><\/td>\n<\/tr>\n<tr>\n<td>logical AND<\/td>\n<td><code>&amp;&amp;<\/code><\/td>\n<\/tr>\n<tr>\n<td>logical OR<\/td>\n<td><code>||<\/code><\/td>\n<\/tr>\n<tr>\n<td>ternary<\/td>\n<td><code>? :<\/code><\/td>\n<\/tr>\n<tr>\n<td>assignment<\/td>\n<td><code>= += -= *= \/= %= &amp;= ^= |= &lt; &gt;= &gt;&gt;&gt;=<\/code><\/td>\n<\/tr>\n<\/table>\n<p>The following quick reference summarizes the operators supported by the Java programming language. <\/p>\n<h3>Simple Assignment Operator<\/h3>\n<\/p>\n<blockquote>\n<pre>=\tSimple assignment operator<\/pre>\n<\/blockquote>\n<p><h3>Arithmetic Operators<\/h3>\n<blockquote>\n<pre>+ \tAdditive operator (also used for String concatenation)- \tSubtraction operator*\tMultiplication operator\/ \tDivision operator%\tRemainder operator<\/pre>\n<\/blockquote>\n<p><h3>Unary Operators<\/h3>\n<blockquote>\n<pre>+ \tUnary plus operator; indicates positive value (numbers are positive without this, however)- \tUnary minus operator; negates an expression++  \tIncrement operator; increments a value by 1--    \tDecrement operator; decrements a value by 1!     \tLogical compliment operator; inverts the value of a boolean<\/pre>\n<\/blockquote>\n<h3>Equality and Relational Operators<\/h3>\n<blockquote>\n<pre>==\tEqual to!=\tNot equal to&gt;\tGreater than&gt;=\tGreater than or equal to&lt; Less than&lt;=\tLess than or equal to<\/pre>\n<\/blockquote>\n<p><h3>Conditional Operators<\/h3>\n<\/p>\n<blockquote>\n<pre>&amp;&amp; \tConditional-AND|| \tConditional-OR?:      Ternary (shorthand for <code>if-then-else<\/code> statement)<\/pre>\n<\/blockquote>\n<p><h3>Type Comparison Operator<\/h3>\n<\/p>\n<blockquote>\n<pre>instanceof\tCompares an object to a specified type <\/pre>\n<\/blockquote>\n<p><h3>Bitwise and Bit Shift Operators<\/h3>\n<\/p>\n<blockquote>\n<pre>~\tUnary bitwise complement&lt; &gt;\tSigned right shift&gt;&gt;&gt;\tUnsigned right shift&amp;\tBitwise AND^\tBitwise exclusive OR|\tBitwise inclusive OR<\/pre>\n<\/blockquote>\n<p><a href='http:\/\/java.sun.com\/docs\/books\/tutorial\/java\/nutsandbolts\/operators.html' target='new' rel=\"noopener\">Details about java operators<\/a><\/p>\n<p> From: http:\/\/sitestree.com\/?p=4848<br \/> Categories:Java Short Notes, SCJP<br \/>Tags:<br \/> Post Data:2012-12-29 02:01:30<\/p>\n<p>\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com\/' target='new' rel=\"noopener\">https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\t(Big Data, Cloud, Security, Machine Learning): Courses: <a href='http:\/\/Training.SitesTree.com' target='new' rel=\"noopener\"> http:\/\/Training.SitesTree.com<\/a><br \/>\n\t\tIn Bengali: <a href='http:\/\/Bangla.SaLearningSchool.com' target='new' rel=\"noopener\">http:\/\/Bangla.SaLearningSchool.com<\/a><br \/>\n\t\t<a href='http:\/\/SitesTree.com' target='new' rel=\"noopener\">http:\/\/SitesTree.com<\/a><br \/>\n\t\t8112223 Canada Inc.\/JustEtc: <a href='http:\/\/JustEtc.net' target='new' rel=\"noopener\">http:\/\/JustEtc.net (Software\/Web\/Mobile\/Big-Data\/Machine Learning) <\/a><br \/>\n\t\tShop Online: <a href='https:\/\/www.ShopForSoul.com'> https:\/\/www.ShopForSoul.com\/<\/a><br \/>\n\t\tMedium: <a href='https:\/\/medium.com\/@SayedAhmedCanada' target='new' rel=\"noopener\"> https:\/\/medium.com\/@SayedAhmedCanada <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exams like SCJP test your understanding of Java operators and how to use them like: assignment operators: =, +=, -=arithmetic operators: +, -, *, \/, %, ++, &#8212;relational operators: &lt; , , &gt;=, ==, !=logical operators: &amp;, |, ^, !, &amp;&amp;, ||conditional operators: ? : Also operators to check the equality of two objects or &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=65820\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1917,1954],"tags":[],"class_list":["post-65820","post","type-post","status-publish","format-standard","hentry","category-fromsitestree-com","category-scjp-ocjp","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":22128,"url":"http:\/\/bangla.sitestree.com\/?p=22128","url_meta":{"origin":65820,"position":0},"title":"SCJP: Java Operators #SCJP","author":"Sayed","date":"March 10, 2021","format":false,"excerpt":"By Sayed Exams like SCJP test your understanding of Java operators and how to use them like: assignment operators: =, +=, -= arithmetic operators: +, -, *, \/, %, ++, -- relational operators: <, <=, >, >=, ==, != logical operators: &, |, ^, !, &&, || conditional operators: ?\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65872,"url":"http:\/\/bangla.sitestree.com\/?p=65872","url_meta":{"origin":65820,"position":1},"title":"SCJP Training: Lesson 7: Fundamentals #Java Short Notes #SCJP","author":"Sayed","date":"July 16, 2021","format":false,"excerpt":"Controlling Access to Members of a ClassUsing Package MembersCommand-Line ArgumentsCommand-Line I\/O ObjectsPassing information to a Method or ConstructorUsing ObjectsManaging Source and Class FilesAssignment, Arithmetic, and Unary OperatorsEquality, Relational, and Conditional OperatorsObject as a SuperclassComparing Strings and Portions of Strings From: http:\/\/sitestree.com\/?p=5054 Categories:Java Short Notes, SCJPTags: Post Data:2009-05-18 14:59:18 Shop Online:\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":74773,"url":"http:\/\/bangla.sitestree.com\/?p=74773","url_meta":{"origin":65820,"position":2},"title":"Are you interested in becoming a Java Developer and OCJP","author":"Sayed","date":"May 31, 2022","format":false,"excerpt":"Are you interested in becoming a Java Developer and OCJP? OCJP: Oracle Certified Java Programmer? Are you interested in a Java based career track? Short Notes on: OCJP: Oracle Certified Java Programmer Certification. Written long back in the SCJP time. These are for quick review purposes, not really to learn\u2026","rel":"","context":"In &quot;\u09ac\u09cd\u09b2\u0997 \u0964 Blog&quot;","block_context":{"text":"\u09ac\u09cd\u09b2\u0997 \u0964 Blog","link":"http:\/\/bangla.sitestree.com\/?cat=182"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":22132,"url":"http:\/\/bangla.sitestree.com\/?p=22132","url_meta":{"origin":65820,"position":3},"title":"SCJP: Sun Certified Java Programmer: All that you need to know #SCJP","author":"Sayed","date":"March 10, 2021","format":false,"excerpt":"Introduction to Sun Certified Java Programmer Certification CourseJava : SCJP: Important ResourcesJAVA: Some links: useful for exams like scjp\/scjaSCJP Essential KnowledgeSCJP Practice ExamsSCJP Training: Lesson 1: Develop code that declares classes (including abstract and all forms of nested classes), interfaces, and enums, and includes the appropriate use of package and\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65844,"url":"http:\/\/bangla.sitestree.com\/?p=65844","url_meta":{"origin":65820,"position":4},"title":"Java : SCJP: Important Resources #Java Short Notes #SCJP","author":"Sayed","date":"July 16, 2021","format":false,"excerpt":"How to use generics to avoid runtime errors. More Generics Class casting in Java: How to avoid runtime exception - ClassCastException: overloading, overriding, variable and method hiding Java HotSpot virtual machine What Java Technology can do? Offers from Java Technology Java:Common Problems (and Their Solutions) Benefits of OOP: Modularity, Information-hiding,\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":65842,"url":"http:\/\/bangla.sitestree.com\/?p=65842","url_meta":{"origin":65820,"position":5},"title":"SCJP: Random Stuffs #Java Short Notes #SCJP","author":"Sayed","date":"July 16, 2021","format":false,"excerpt":"An enum may NOT be declared in a method An enum can be imported If the JVM has a choice, it will select a method without varargs before selecting a method with varargs When enums are equal, both .equals and == always return true The headMap() method returns the portion\u2026","rel":"","context":"In &quot;FromSitesTree.com&quot;","block_context":{"text":"FromSitesTree.com","link":"http:\/\/bangla.sitestree.com\/?cat=1917"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=65820"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65820\/revisions"}],"predecessor-version":[{"id":74748,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65820\/revisions\/74748"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65820"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65820"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}