10. java.lang package.pdf - JAVA Means DURGA SIR 123 nd...

This preview shows page 1 - 5 out of 75 pages.

JAVA Means DURGA SIR 123 DURGASOFT, # 202,2 nd Floor,HUDA Maitrivanam,Ameerpet, Hyderabad - 500038, 040 – 64 51 27 86, 80 96 96 96 96, 9246212143 |
Image of page 1

Subscribe to view the full document.

JAVA Means DURGA SIR 124 DURGASOFT, # 202,2 nd Floor,HUDA Maitrivanam,Ameerpet, Hyderabad - 500038, 040 – 64 51 27 86, 80 96 96 96 96, 9246212143 |
Image of page 2
JAVA Means DURGA SIR 125 DURGASOFT, # 202,2 nd Floor,HUDA Maitrivanam,Ameerpet, Hyderabad - 500038, 040 – 64 51 27 86, 80 96 96 96 96, 9246212143 | java.lang package Agenda 1. Introduction 2. Java.lang.Object class toString( ) method hashCode() method toString() method vs hashCode() method equals() method Simplified version of .equals() method More simplified version of .equals() method Relationship between .equals() method and ==(double equal operator) Differences between == (double equal operator) and .equals() method? Contract between .equals() method and hashCode() method Clone () method Shallow cloning Deep Cloning getClass() method finalize( ) wait( ) , notify( ) , notifyAll( ) 3. java.lang.String class Importance of String constant pool (SCP) Interning of String objects String class constructors Important methods of String class Creation of our own immutable class Final vs immutability 4. StringBuffer Constructors Important methods of StringBuffer 5. StringBuilder (1.5v) StringBuffer Vs StringBuilder String vs StringBuffer vs StringBuilder Method chaining 6. Wrapper classes Constructors Wrapper class Constructor summery 7. Utility methods valueOf() method xxxValue() method parseXxx() method toString() method 8. Dancing between String, wrapper object and primitive 9. Partial Hierarchy of java.lang package Void 10. Autoboxing and Autounboxing
Image of page 3

Subscribe to view the full document.

JAVA Means DURGA SIR 126 DURGASOFT, # 202,2 nd Floor,HUDA Maitrivanam,Ameerpet, Hyderabad - 500038, 040 – 64 51 27 86, 80 96 96 96 96, 9246212143 | Autoboxing Autounboxing Conclusions 11. Overloading with respect to widening, Autoboxing and var-arg methods Case 1: Widening vs Autoboxing Case 2: Widening vs var-arg method Case 3: Autoboxing vs var-arg method Introduction The following are some of important classes present in java.lang package. 1. Object class 2. String class 3. StringBuffer class 4. StringBuilder class (1.5 v) 5. Wrapper Classes 6. Autoboxing and Autounboxing(1.5 v) For writing any java program the most commonly required classes and interfaces are encapsulated in the separate package which is nothing but java.lang package. It is not required to import java.lang package in our program because it is available by default to every java program.
Image of page 4