Page 25 - JAVA Programming
P. 25

24




               2 . Non- Primitive Data Types

                       The term non-primitive data type means that these types contain “a
                       memory address of the variable”.


                       In contrast to primitive data types, which are defined by Java, non-
                       primitive data types are not defined or created by Java but they are
                       created  by  the  programmers.  They  are  also  called  Reference  data
                       types  because  they  cannot  store the  value  of  a  variable  directly in
                       memory.


                       Non-primitive data types do not store the value itself but they store a
                       reference or address (memory location) of that value.

                       They can call methods to perform a particular function. They can also
                       be null.


               There are many non-primitive data types in Java.





                                      Non-Primitive Data Types





                                                       String


                                                        Array


                                                       Object



                                                        Class



                                                      Interfaces
   20   21   22   23   24   25   26   27   28   29