JAVA . . .
The Correct Reference
(A Book from Satish Series)
1) Chapter 1 Introduction to Object Oriented Programming
Introduction
Concepts
Objects
Classes
Polymorphism
Dynamic Binding
Message Communication
Advantages
Applications
***************
***************
Chapter 2 Introduction to
... [More]
Java
2.1 Birth of Java
2.2 Why Java?
2.2.1 Internet
2.2.2 OOP’s
2.2.3 Platform Independent
2.2.4 Security
2.2.5 Many More
2.3 Java Features
2.3.1 Platform Independent
2.3.2 Object Oriented
2.3.3 Robust
2.3.4 Multi Threading
2.3.5 Inheritance
2.3.6 Distributed
2.3.7 Interpreted
2.3.8 High Performance
2.4 Differences between Java and C and C++
2.4.1 Difference between Java and C
2.4.2 Difference between Java and C++
2.5 JDk Tools
2.5.1 Javac
2.5.2 java
2.5.3 Javah
2.5.4 appletviewer.exe
2.5.5 jar.exe
2.5.6 javadoc.exe
2.5.7 jdb.exe
2.5.8 javap.exe
2.5.9 javaw.exe
2.5.10 packager.exe
2.5.11 rmic.exe
2.5.12 rmid.exe
2.5.13 rmiregistry.exe
Chapter 3 Java Overview
3.1Introduction
3.2 First Java Program
3.2.1 Class Declaration
3.2.2 Main Method
3.2.3 Static Keyword
3.2.4 Braces
3.2.5 Printing Statement
3.3 Compiling and Running
3.4 Command Line Arguments
3.5 Java Tokens
3.5.1 Identifiers
3.5.2 Literals
3.5.3 Number Literals
3.5.4 Boolean Literals
3.5.5 Character Literals
3.5.6 String Literals
3.5.7 Java Keywords
3.5.7.1 List Of Keywords
3.5.8 Java Separators
3.5.8.1 Java Separators List
3.6 Simple output and input operations with Examples
**********
Chapter 4 Loops, Data Types, Variables, Arrays & Access Specifiers
4.0 Introduction
4.1 Types of Data types
4.1.1 Data types Diagram
4.2 Integers
4.2.1 byte
4.2.2 short
4.2.3 int
4.2.4 long
4.3 Floating Types
4.3.1 float
4.3.2 double
4.4 Characters
4.4.1 char
4.5 Boolean
4.5.1 boolean
4.6 Declaring Variables
4.7 Type casting
4.7.1 Automatic type casting with Table
4.8 Arrays
4.8.1 Single dimensional Arrays
4.8.2 Double dimensional Arrays
4.8.3 Multi Dimensional Arrays
4.9 Blocks “{ }”
4.10 Scope of a variable
4.11 Access Specifiers
4.11.1 Public
4.11.2 Private
4.11.3 Protected
4.11.4 Default
4.11.5 Private protected
4.11.6 Table of Access
Chapter-5 Operators and their Operation
5.1 Introduction
5.2 Arithmetic Operators
5.3 Assignment Operators
5.4 Increment and Decrement Operators
5.5 Bitwise Operators
5.5.1 Advantages of bitwise operators
5.6 ? : Operator (Conditional Operator)
5.7 Logical Operators
5.8 Dot operator
5.9 Operators Precedence
Chapter 6 Expressions,Statements and Loops
6.1 Expressions
6.1.1 Introduction
6.1.2 Arithmetic Operations
6.1.3 Evaluation Operations
6.1.4 Expressions return true or false
6.1.5 Priorities in expressions
6.1.6 Example programmes
6.2 Statements:
6.2.1 Introduction
6.2.2 Types of Statements
6.3 Loops:
6.3.1 if
6.3.2 If else
6.3.3 Nested if else
6.3.4 If using Braces
6.3.5 Switch case
6.3.6 for loop
6.3.7 while loop
6.3.8 do…while
6.3.9 label “:”
6.3.10 break
6.3.11 continue
6.3.12 Labeled Loops
6.3.13 Breaking Out of Loops
6.4 Example programmes
Chapter 7 Creating & using classes, Objects &methods
7.1 Introduction
7.2 Overview of a Class
` 7.3 Creating a class
7.4 Constructors
7.5 new, return keywords
7.5.1 new keyword
7.5.2 return keyword
7.6 Defining methods, variables
7.6.1 methods returning variables
7.6.2 methods returning objects
7.6.3 call by value
7.6.4 call by reference
7.7 Scope of a variable
7.8 Overloading Constructors
7.9 Overloading Methods
7.10 Static keyword
7.11 Static variables
7.12 Static methods
7.13 Fields
7.14 Access Specifiers
7.15 Class.forName();
7.16 final keyword
7.17 final classes
7.18 final methods and variables
Chapter 8 Introduction to Interfaces and Packages and Inheritance
8.1 Interfaces
8.1.1 Introduction
8.1.2 Creating Interfaces
8.1.3 Rules for creating interface
8.1.4 Implementing Interfaces
8.1.5 Uses of interface
8.1.6 class versus interface
8.1.7 abstract versus interface
8.1.8 References to Objects
8.1.9 extending interface
8.2 Packages
8.2.1 Introduction
8.2.2 Creating package
8.2.3 Importing package
8.2.4 Uses of package
8.2.5 Sample problems
8.3 Inheritance
8.3.1 Introduction
8.3.2 Advantages of Inheritance
8.3.3 Types of Inheritance
8.3.4 Creating sub classes
8.3.5 extending classes
8.3.6 Overriding
8.3.7 Examples
Chapter 9 Exploring Java.lang.*
9.1 Introduction
9.2 Classes List
9.3 Wrapper Classes
9.3.1 Introduction
9.3.2 Integer
9.3.3 Byte
9.3.4 Long
9.3.5 Float
9.3.6 Char
9.3.7 Boolean
9.4 void
9.5 Process
9.6 Runtime
9.7 ClassLoader
9.8 Class.forName()
9.9 Throwable
9.10 Throws
9.11 System.out.
9.12 System.in;
9.13 Java.lang.Math
9.13.1 List of all
9.13.2 cos
9.13..3 sin
9.13..4 Tan
9.13.5 sqrt
9.14 Examples
Chapter 10 Data Structures and java.util.*;
10.1 Introduction
10.2 classes and interfaces list
10.3 Interfaces
10.3.1 Collection
10.3.2 List
10.3.3 Enumaration
10.3.4 Set
10.3.5 Map
10.3.6 SortedSet
10.3.7 Iterator
10.4 Classes
10.4.1 ArrayList
10.4.2 LinkedList
10.4.3 Vector
10.4.4 Stack
10.4.5 HashMap
10.4.6 HashSet
10.4.7 HashTable
10.4.8 Date
10.4.9 Dictionary
10.4.10 String Tokenizer
10.4.11 TreeSet
10.4.12 Random
Chapter 11 Exception Handling
11.1 Introduction
11.2 Types of Exceptions
11.3 Hierarchy of Exception
11.4 Error
11.4.1 Types of Errors
11.5 Escapable Exception
11.6 Using throws
11.7 Using try and catch block and finally
11.7.1 try and catch
11.7.2 try and multiple catch blocks
11.7.3 Nested try’s
11.7.4 finally keyword
11.8 throw statement
11.9 Confusable final and finally
11.10 Creating our own Exception
****************
Chapter 12 Multithread Programming
12.1 Introduction
12.1.1 Multi processing
12.1.2 Multi tasking
12.1.3 Multi Threading
12.2 Creating a thread
12.2.1 Extending Thread
12.2.2 Implementing Runnable
12.3 Multiple Threads
12.4 Life Cycle of a Thread
12.4.1 New born State
12.4.2 Runnable
12.4.3 Running
12.4.4 Blocked
12.4.5 Dead State
12.5 Methods of Thread
12.5.1 Thread Priority
12.5.2 yeild()
12.5.3 suspend()
12.5.4 stop()
12.5.5 wait();
12.5.6 isAlive();
12.5.7 join();
12.5.8 Interrupted
12.7 threadGroup
12.8 Synchronization
12.9 Deadlock
Chapter 13 Managing I/O
13.1 Fundamentals
13.1.1 File
13.2 Streams
13.2.1 Byte Stream
13.2.2 Character Stream
13.3 All Byte Stream Classes
13.3.1 Inputs
13.3.2 Outputs
13.4 All Character Streams
13.4.1 Readers
13.4.2 Writers
13.5 Reading/writing from, to console (Keyboard/monitor)
13.5.1 Byte stream
13.5.1.1 Reading
13.5.1.2 Writing
13.5.2 Character Stream
13.5.2.1 Reading
13.5.2.2 Writing
13.6 Managing Files
13.6.1 File
13.6.2 Methods:
13.6.2.1 isDirectory()
13.6.2.2 file.list
13.6.3 ByteStream:
13.6.3.1 FileInputStream
13.6.3.2F ileOutputStream
13.6.4 Character:
13.6.4.1 FileWriter
13.6.4.2 FileReader
13.6.5 SequenceInputStream
13.6.6 RandomAccessFile
13.6.7 Serialization
13.6.7.1 ObjectOutput
13.6.7.2 ObjectInput
13.6.7.3 Examples
13.6.8 Explanations and example programmes
Chapter 14 Developing AWT
14.1 Introduction
14.1.1 Component
14.1.2 Container
14.1.3 Panel
14.1.4 Window
14.1.5 Frame
14.2 List of awt classes and Interfaces
14.3 Creating awt programs
14.4 paint(),repaint(),Graphics
14.4.1 Drawing Lines
14.4.2 Drawing Rectangle
14.4.3 Drawing Ellipses
14.4.4 Drawing Circles
14.4.5 Drawing Arcs
14.4.6 Drawing Polygons
14.4.7 Font
14.4.8 Color
****************
Chapter 15 AWT Controls, Menus ,Layout Managers and Events a nd Listeners
Introduction
Labels
Buttons
Checkbox
ChechboxGroup
TextField
TextArea
Lists
ScrollBars
Layout Managers
Introduction
FlowLayout
BorderLayout
CardLayout
GridLayout
MenuItem
Menus
MenuBars
Handling Events
Button
Checkbox
setBackground();
Events:
Introduction
Different type of events and listeners
Event Listeners
Mouse Events
Mouse Clicks
Mouse Down and Mouse Up Events
An Example: Spots
Double-Clicks
Chapter 16 Applets
Introduction
Applet Class
repaint
Lifecycle
Tags
Parameter passing to applet
Applet methods
Sample programs
Chapter 17 JDBC
Introduction
Types of Drivers
Database
Sql
MS access
Configuring DSN
List of Classes and interfaces
Useful classes for type-1 driver
Connection
Statement
DriverManager
Inserting record in table
updating record in table
ResultSet;
retrieving record from table
creating table from JDBC-ODBC Driver
creating column from JDBC-ODBC Driver
thin Driver
Callable Statement
Prepared Statement
DatabaseMetaData
Chapter 18 Servlets
Introduction
Classes
Methods
GenericServlet
HttpServlet
Request
Response
Client
Server
Web server
DNS
Jdk2.0
ServletRunner
PostMethod
GetMethod
GenericServlet
HttpServletRequest
HttpServletResponse
ServletConfig
ServletLifeCycle
Cookies
Introduction
Creating Cookies
Retrieving Cookies
Chapter 19 Swings or JFC’s
*****
*****
*******
********
Chapter 20 Java Script
Introduction
Fundamentals
Tags
Images
anchor
Functions
ActiveXObjects
FileScripptingObject
Adodb
CreatingFile
Manipulating Files
Deleting files
Creating Folder
Chapter 21 JDB (debugging) Introduction
Chapter 22 Java Terms
Chapter 23 Java Interview Questions
Chapter 24 API Packages
Chapter 25 Real Time Java
Chapter 26 Java Stuff
Chapter 27 Java Projects
Introduction
Important Terms
Thread Beans Native Code Object
Class Method Parameter Constructor
Main method J2SE J2EE J2ME
Applet Browser Server Client
Byte Code Application JavaScript Error
Bug Compiler Interpreter HTML
HTTP TCP/IP Libraries This
Super JVM Parameter
Object: Object is a living run-time entity .We can clearly understand what an object is by examining various objects .A cycle is an object .A Bike is an Object. Man is an Object and so on …let us see what made it as objects
A Cycle has a name (attribute).A cycle has a chain (attribute) .A cycle contains pedals (attribute).we can use cycle for some functions like riding.(function). When we consider a man he will he will have a name(attribute),hands(attributes),legs(attribute)
Using his hands he will do some work (function)using his legs he will walk(function) and he has some more functions like running ,eating ,talking, sleeping, and so on(functions)…
Man Object
Name
Eyes
Hands Legs
Walk()
Seeing()
Sleeping()
Eating()
So man cycle are Objects because they have some attributes and functions
Object= variables(attributes) +methods (functions)
Functions are called as methods in java
Therefore we can define an object as a runtime entity (which will be created in the program execution
Class: Before knowing about a class first you should be familiar with object, which I explained above. A class is proto type or blue print of an object
Which are mostly equals to structs and unions in C++ C languages, with little differences
Class defines the object. The definition of object is class
Consider the following code in JAVA
class demo1
{
int var1;
String var2;
void method1()
{
//method 1 Code
}
void mathod2()
{
// method 2 code
}
}
here demo1 is class name ,var1,var2 are variables of type int and String(don’t be confused or temper you will come to all these in following sections) and method1(),method2() are methods
Data Types:
In our daily life, we use many things for many purposes .we use calculators for calculations. we use *** for ***.and so on. Like that , we create objects for several purposes which are described according to class definition. Therefore, that object is data type of that class .java provides eights built in data types or simple data types, or primitive data types. They are
Diagram Primitive data types
Numbers Characters Boolean
Integers Floating points char boolean
byte short int long float double
Operator precedence.
Operator Notes
. [] () Parentheses (()) are used to group expressions and to pass parameters;
dot (.) is used for access to methods and variables within objects and classes
square brackets ([]) are used for arrays
++ -- ! ~
* / % Multiplication, division, modulus
+ - Addition, subtraction
<< >> >>> Bitwise left and right shift
< > <= >= Relational comparison tests
== != Equality
& AND
^ XOR
| OR
&& Logical AND
|| Logical OR
? : Shorthand for if...then...else (also Called Condition Variable)
= += -= *= /= %= ^= Various assignments
&= |= <<= >>= >>>= More assignments [Less]