SCJP: Rules #Java Short Notes #SCJP

  • A class's superclasses don't have to implement Serializable in order to be serialized
  • if a superclass doesn't implement Serializable then it's constructor will run during deserialization
  • A transient variable's state is lost during serialization, but a volatile variable's state is not lost
  • Java:Volatile variable
  • Transient Variable
  • NumberFormat, Calendar, DateFormat are abstract classes. Use the getInstance method to get NumberFormat instances.
  • 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.
  • The default separator in Scanner class is a blank NOT a comma
  • Multiple threads can be created using the same Runnable object, but a given thread can be started only once.
  • Thread.yield(): Causes the currently executing thread object to temporarily pause and allow other threads to execute.
  • Thread.join(): Waits for this thread to die.
  • Wait(), Notify(), NotifyAll() methods
  • Low coupling: classes know the least possible about each other, is preferable over tight coupling.
  • High cohesion: Each class has well focused responsibilities. Is preferable over low cohesion.
  • Polymorphism does NOT apply to static methods.
  • Instance variable cannot be referenced from static method

From: http://sitestree.com/?p=4883
Categories:Java Short Notes, SCJP
Tags:
Post Data:2011-09-04 06:32:26

Shop Online: https://www.ShopForSoul.com/
(Big Data, Cloud, Security, Machine Learning): Courses: http://Training.SitesTree.com
In Bengali: http://Bangla.SaLearningSchool.com
http://SitesTree.com
8112223 Canada Inc./JustEtc: http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning)
Shop Online: https://www.ShopForSoul.com/
Medium: https://medium.com/@SayedAhmedCanada

Leave a Reply