{"id":65850,"date":"2021-07-16T04:10:06","date_gmt":"2021-07-16T08:10:06","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/scjp-rules-java-short-notes-scjp\/"},"modified":"2022-05-10T20:04:08","modified_gmt":"2022-05-11T00:04:08","slug":"scjp-rules-java-short-notes-scjp","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=65850","title":{"rendered":"SCJP: Rules #Java Short Notes #SCJP"},"content":{"rendered":"<ul>\n<li> A class&#8217;s superclasses don&#8217;t have to implement           Serializable in order to be serialized     <\/li>\n<li> if a superclass doesn&#8217;t implement Serializable then           it&#8217;s constructor will run during deserialization      <\/li>\n<li> A transient variable&#8217;s state is lost during           serialization, but a volatile variable&#8217;s state is           not lost     <\/li>\n<li> <a href='http:\/\/www.javaperformancetuning.com\/news\/qotm030.shtml' target='new' rel=\"noopener\">Java:Volatile variable<\/a>     <\/li>\n<li> <a href='http:\/\/www.geekinterview.com\/question_details\/2' target='new' rel=\"noopener\">Transient  Variable<\/a>     <\/li>\n<li> NumberFormat, Calendar,  DateFormat are abstract           classes. Use the getInstance method to get            NumberFormat instances.     <\/li>\n<li> The + quantifier in a regular expression indicates           1 or more occurrences, * indicates 0 or more, []            just one character in the group, () indicates a            whole group match.     <\/li>\n<li> The default separator in Scanner class is a blank          NOT a comma     <\/li>\n<li> Multiple threads can be created using the same           Runnable object, but a given thread can be started          only once.     <\/li>\n<li> Thread.yield(): Causes the currently executing           thread object to temporarily pause and allow other          threads to execute.     <\/li>\n<li> Thread.join():  Waits for this thread to die.     <\/li>\n<li> <a href='http:\/\/java.sun.com\/j2se\/1.3\/docs\/api\/java\/lang\/Object.html#wait(long)' target='new' rel=\"noopener\">Wait(), Notify(), NotifyAll() methods<\/a>     <\/li>\n<li> Low coupling: classes know the least possible           about each other, is preferable over tight           coupling.       <\/li>\n<li> High cohesion: Each class has well focused            responsibilities. Is preferable over low            cohesion.      <\/li>\n<li> Polymorphism does NOT apply to static methods.      <\/li>\n<li> Instance variable cannot be referenced from             static method  <\/li>\n<\/ul>\n<p> From: http:\/\/sitestree.com\/?p=4883<br \/> Categories:Java Short Notes, SCJP<br \/>Tags:<br \/> Post Data:2011-09-04 06:32:26<\/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>A class&#8217;s superclasses don&#8217;t have to implement Serializable in order to be serialized if a superclass doesn&#8217;t implement Serializable then it&#8217;s constructor will run during deserialization A transient variable&#8217;s state is lost during serialization, but a volatile variable&#8217;s state is not lost Java:Volatile variable Transient Variable NumberFormat, Calendar, DateFormat are abstract classes. Use the getInstance &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=65850\">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_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1917,1954],"tags":[],"class_list":["post-65850","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":65852,"url":"http:\/\/bangla.sitestree.com\/?p=65852","url_meta":{"origin":65850,"position":0},"title":"SCJP: Short Notes #Java Short Notes #SCJP","author":"Sayed","date":"July 16, 2021","format":false,"excerpt":"For the package package com.sun2;public enum Seasons {SUMMER, FALL, WINTER, SPRING} Valid import statements are:import com.sun2.Seasons; \/\/ the class import static com.sun2.Seasons.*; \/\/all enum valuesimport static com.sun2.Seasons.FALL; \/\/only one enum value An interface can extend many interfacesInterfaces can have variables, overrides and overloads An enum can have methods and can\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":65822,"url":"http:\/\/bangla.sitestree.com\/?p=65822","url_meta":{"origin":65850,"position":1},"title":"SCJP: Language Fundamentals #Java Short Notes #SCJP","author":"Sayed","date":"July 15, 2021","format":false,"excerpt":"Class declaration and java source file. Only \"one\" top-level public class is allowed per java source file. The name of the java source file and the name of the top-level public class MUST be the same. If no public class is there in a file, after compiling separate class files\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":65818,"url":"http:\/\/bangla.sitestree.com\/?p=65818","url_meta":{"origin":65850,"position":2},"title":"SCJP: Classpath and Jar #Java Short Notes #SCJP #Blog","author":"Sayed","date":"July 15, 2021","format":false,"excerpt":"Java certification exams like SCJP test your knowledge about java classpath. Check here for an excellent resource on the topic . System classpathWe can specify classpath in the command line or make use of a `system' class path. The IDEs have their own way of maintaining class paths. System class\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":65850,"position":3},"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":65820,"url":"http:\/\/bangla.sitestree.com\/?p=65820","url_meta":{"origin":65850,"position":4},"title":"SCJP: Java Operators #Java Short Notes #SCJP","author":"Sayed","date":"July 15, 2021","format":false,"excerpt":"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: ? : Also operators to check the\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":65840,"url":"http:\/\/bangla.sitestree.com\/?p=65840","url_meta":{"origin":65850,"position":5},"title":"SCJP: Interfaces #Java Short Notes #SCJP","author":"Sayed","date":"July 16, 2021","format":false,"excerpt":"Interface An interface is a reference type, similar to a class Interfaces can contain only constants, method signatures, and nested types No method is implemented Interfaces cannot be instantiated They can only be implemented by classes or extended by other interfaces Interfaces are not part of the class hierarchy A\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\/65850","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=65850"}],"version-history":[{"count":2,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65850\/revisions"}],"predecessor-version":[{"id":74736,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/65850\/revisions\/74736"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=65850"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=65850"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=65850"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}