jagomart
digital resources
picture1_Advanced Java


 111x       Filetype PDF       File size 0.89 MB       Source: enos.itcollege.ee


File: Advanced Java
advancedjava i advancedjava advancedjava ii contents 1 howtocreateanddestroyobjects 1 1 1 introduction 1 1 2 instance construction 1 1 2 1 implicit generated constructor 1 1 2 2 constructors without ...

icon picture PDF Filetype PDF | Posted on 01 Feb 2023 | 2 years ago
Partial capture of text on file.
       Advancedjava                                             i
                            Advancedjava
                       Advancedjava                                                                                                                                                                                                ii
                       Contents
                       1     Howtocreateanddestroyobjects                                                                                                                                                                         1
                             1.1      Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                    1
                             1.2      Instance Construction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     1
                                      1.2.1        Implicit (Generated) Constructor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 1
                                      1.2.2        Constructors without Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   1
                                      1.2.3        Constructors with Arguments                        .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . .                        2
                                      1.2.4        Initialization Blocks               .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . .                        2
                                      1.2.5        Construction guarantee . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 3
                                      1.2.6        Visibility        .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . . .                         4
                                      1.2.7        Garbage collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                 4
                                      1.2.8        Finalizers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                               5
                             1.3      Static initialization             .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . .                        5
                             1.4      Construction Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     5
                                      1.4.1        Singleton . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                6
                                      1.4.2        Utility/Helper Class                .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . .                        7
                                      1.4.3        Factory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                7
                                      1.4.4        Dependency Injection                   .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . .                        8
                             1.5      DownloadtheSourceCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                           9
                             1.6      What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     9
                       2     Using methods commontoallobjects                                                                                                                                                                   10
                             2.1      Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  10
                             2.2      Methodsequals and hashCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                        11
                             2.3      MethodtoString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                    13
                             2.4      Methodclone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     14
                             2.5      Methodequals and == operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                      15
                             2.6      Useful helper classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   15
                             2.7      DownloadtheSourceCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                         16
                             2.8      What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   16
                       Advancedjava                                                                                                                                                                                               iii
                       3     HowtodesignClassesandInterfaces                                                                                                                                                                    17
                             3.1      Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  17
                             3.2      Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  17
                             3.3      Marker Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   18
                             3.4      Functional interfaces, default and static methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   19
                             3.5      Abstract classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  20
                             3.6      Immutable classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   20
                             3.7      Anonymousclasses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                      21
                             3.8      Visibility         .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . . .                       22
                             3.9      Inheritance           .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . . .                       22
                             3.10 Multiple inheritance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                      24
                             3.11 Inheritance and composition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                         25
                             3.12 Encapsulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                       26
                             3.13 Final classes and methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                       27
                             3.14 Download the Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                          27
                             3.15 What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                       27
                       4     HowandwhentouseGenerics                                                                                                                                                                            28
                             4.1      Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  28
                             4.2      Generics and interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   28
                             4.3      Generics and classes                 .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . .                      29
                             4.4      Generics and methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                    29
                             4.5      Limitation of generics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  30
                             4.6      Generics, wildcards and bounded types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     31
                             4.7      Generics and type inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                   32
                             4.8      Generics and annotations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                    33
                             4.9      Accessing generic type parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                     33
                             4.10 Whentousegenerics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                           34
                             4.11 Download the Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                          35
                             4.12 What’s next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                       35
                       5     HowandwhentouseEnumsandAnnotations                                                                                                                                                                 36
                             5.1      Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                  36
                             5.2      Enumsasspecial classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                      36
                             5.3      Enumsandinstancefields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                       37
                             5.4      Enumsandinterfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                      38
                             5.5      Enumsandgenerics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                      39
                             5.6      Convenient Enums methods                         .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  . . . . . . . . . . . . . . . . . . .                      39
                             5.7      Specialized Collections: EnumSet and EnumMap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .                                                                          40
The words contained in this file might help you see if this file matches what you are looking for:

...Advancedjava i ii contents howtocreateanddestroyobjects introduction instance construction implicit generated constructor constructors without arguments with initialization blocks guarantee visibility garbage collection finalizers static patterns singleton utility helper class factory dependency injection downloadthesourcecode what s next using methods commontoallobjects methodsequals and hashcode methodtostring methodclone methodequals operator useful classes iii howtodesignclassesandinterfaces interfaces marker functional default abstract immutable anonymousclasses inheritance multiple composition encapsulation...

no reviews yet
Please Login to review.