Core Java
Core Java
Introduction:
History
JVM
Java Setup in System
Java first Program
Variables
Java data types
Type casting
Java Operations
If else
Switch Control
Loops (For, while, Do while, For-each)
Continue and Break statement with example.
History:
1. Sun Microsystem (1991) created.
2. Oracle acquired.
3. Oak previously named.
4. Development Team - James Gosling and Patrick Naughton and team
5. Father of Java – James Gosling
6. Java is Object-Oriented, General-Purpose Programming, Robust, Platform
independent programming language.
7. Desktop applications – Swing, Enterprise Application, Mobile Application and
Android Application for Java is used.
TYPE CASTING:
Conversion of one data type to another data type
Type casting of 2 types:
a) Implicit Type Casting (Automatically JVM)
b) Forcefully by Programmer (Explicit Type casting)
Implicit Type Casting Eg.
int i = 50;
double a;
a = I;
Forcefully by Programmer, Eg.
double myval =34.23
int myint = (int) myval;
Automatic Conversion
40 40.0
61 61.63
Forcefull Conversion
Method Overriding:
Lets say A person name “Mohan” has property of X;
Shyam can reuse the X;
Shyam may be not satisfied with X;
So he redefined;
Function + body(functionality Property)
So Shyam can redefined the body.
Child overrides the body.