04-03-2013, 04:16 PM
Core Java (unit-1)
Core Java.pptx (Size: 302.72 KB / Downloads: 16)
Types of Programming Methodology
Un-Structured Programming Methodology (Assembly language) : complex to code, debugging difficult, no-reuse.
Procedural Programming Methodology (C language):Focus more on work rather than who is going to use .
Object-Oriented Programming Methodology : (C++, Java, C#, VB.NET, ASP.NET):
History of Java
Created in 1991 by James Gosling of Sun Microsystems. (Currently Owned By Oracle)
Initially called Oak, but was renamed “Java” in 1995.
The original motivation for Java
The need for Platform Independent language
What is an Object?
What possible states can this object be in?
What possible behavior can this object perform?
State and Behavior
Dogs have state (name, color, breed)
And behavior (barking)
Data Abstraction & Encapsulation
Encapsulation: Wrapping of data and methods into a single unit (called class)
Data is not accessible to outside world
Abstraction : Act of representing essential features without including the background details or explanations.
Class Loader
Java provides a dynamic load feature; it loads and links the class when it refers to a class for the first time at runtime, not compile time.
Each class loader has its namespace that stores the loaded classes.
When a class loader loads a class, it searches the class based on FQCN (Fully Qualified Class Name) stored in the namespace to check whether or not the class has been already loaded.
Even if the class has an identical FQCN but a different namespace, it is regarded as a different class. A different namespace means that the class has been loaded by another class loader.