Sunday, June 9, 2013

OAF Basics Cheper 1 JAVA Basics

1. Java Basics
1.1 Encapsulation.
1.2 OOP
1.2.1  Encapsulation
1.2.2 Abstraction ??
1.2.3 Inheritance
1.2.4 Polymorphism
1.3 Class
       BluePrint that describes the object.
1.4 Object
1.5 Method
1.6 Interface
      Can contain only
                                 constants
                                 Method Signature
                                 Nested Types
      Can not be instantiated.
1.7 Java Bean
      Reusable Software component, can be visually manipulated in builder tools.
1.8 Constructor
      Called  automatically --> when object is created.
      Declared public.
      Has same name as class.
      must not specify a return type.
      supplies a no-arg constructor.
1.9 Array
      wrapper class.
      collection of data of same data type.
1.10 Primitive data types in Java.
1.10.1 Byte -- 8 - -128 to 127
1.10.2 short 16 bit
1.10.3 long 64 bit
1.10.4 float 32 bit
1.10.5 double 64 bit
1.10.6 boolean -- true/false
1.10.7 char 16 bit
1.11 Different types of variavbles
1.11.1 Instance Variable
            OOP -->Objects store their state  in  Non Static Fields --> declared without the static keyword. 
Each object in class has its own set of values.
1.11.2 Class Variables (Static Fields)
        Collectively related to class.
        Shared by all objects.
1.11.3 Local Variables
           defied in code of method.
1.11.4 Parameters
            Arguments.
1.12 Type Casting
          Treating a variable of one type as though it is of another type.
           UPcasting  --> Implicit
           DOWNcasting
1.13 Exception handing Java
         Error occurs in Method --> The method creates an object and hands it off to the run time system.  --> Object is called exception object with info of error, type and state of prg.
Above process is called Throwing an Exception.
1.13.1 Checked Exception
1.13.2 Error
1.13.3 Run time exception
1.13.4 Exception Handler --> Try Block
1.13.5 FINALLY keyword
         

               
    
   
     
      




No comments:

Post a Comment