Venkatesh Maipathii

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Dt : 6/3/2024

Summary of CoreJava:(part-1)
1.Java Programming Components(Java Alphabets)
(a)Variables
(b)Methods
(c)Constructors
(d)Blocks
(e)Classes

i
thi
(f)Interfaces
(g)AbstractClasses

ipa
2.Java Programming Concepts
(a)Object Oriented Programming Concept
Ma
(b)Exception Handling Process
(c)Multi Threading Process
(d)Java Collection Framework(JCF)
sh

(c)File Storage in Java


(d)Networking in Java
ate

3.Object Oriented Programming features


nk

(a)Class
(b)Object
Ve

(c)Abstraction
(d)Encapsulation
(e)PolyMorphism
(f)Inheritance
------------------------------------------------------------------------------------------
Advjava:(part-2)
faq:
define Application?
=>set-of-programs collected together to perform defined action is known as Application.

Types of Applications:
=>Applications are categorized into four types:
1.Stand-Alone-Applications
2.Web Applications

i
thi
3.Enterprise Applications
4.Mobile Applications

ipa
1.Stand-Alone-Applications:
=>The applications which are installed in one computer and performs actions in the same
Ma
computer are known as Stand-Alone Application or Windows Applications or DeskTop
Applications.
=>Based on User interaction the Stand-Alone Applications are categorized into two
sh

types:
(i)CUI Applications
ate

(ii)GUI Applications
nk

(i)CUI Applications:
=>In CUI Applications the user interacts through Console input(Command Prompt)
Ve

(CUI - Console User Interface)

(ii)GUI Applications:
=>In GUI Applications the user interacts through GUI-Components
(GUI - Graphical User Interface)

Note:
=>Stand-Alone Applications means Non-Server Applications.
-------------------------------------------------------------------------------------------------------
*imp
2.Web Applications:
=>The applications which are executed in Server-Environment and interacts with user
through WebBrowser are known as Web Applications.
=>we use the following three technologies to Construct Web Applications:
(i)JDBC
(ii)Servlet

i
thi
(iii)JSP
Diagram:

ipa
Ma
sh
ate
nk
Ve

(i)JDBC:
=>JDBC stands for 'Java DataBase Connectivity' and which is used to interact with
Database.
(ii)Servlet:
=>Servlet means 'Server-Program' and which accepts the request from user through
WebBrowser

(iii)JSP:
=>JSP stands for 'Java Server Page' and which is response from Web Application
----------------------------------------------------------------------------------------------------------------
3.Enterprise Applications:

i
thi
=>The applications which are executing in distributed environment and depending on
the
features like "Security","Load Balancing" and "Clustering" are known as Enterprise

ipa
Applications or Enterprise Distributed Applications.
-------------------------------------------------------------------------------------------------------------
Ma
4.Mobile Applications:
=>The applications which are executed in Mobile Environment are known as Mobile
Applications.
sh

==================================================================
*imp
ate

define Storage?
=>The memory location where the data is available for access,is known as Storage.
nk

Types of Storages:
Ve

=>According to Java Developer,the storages are categorized into four types:


1.Field Storage
2.Object Storage
3.File Storage
4.Database Storage

1.Field Storage:
=>The memory generated to hold single-data-value is known as Field Storage.
=>Primitive datatypes will generate Field Storages.

2.Object Storage:
=>The memory generated to hold group-members is known as Object Storage.
=>NonPrimitive datatypes will generate Object Storages

Dt : 7/3/2024
Ex:

i
thi
class Display
{

ipa
static int a = 10;
int b = 20;
void dis()
Ma
{
int c = 30;
Sop(a,b,c);
sh

}
}
ate

Display ob = new Display();


nk

Diagram:
Ve
i
thi
ipa
faq:
wt is the diff b/w
Ma
(i)Object
(ii)Object reference
(iii)Object reference Variable
sh

(i)Object
ate

=>The memory generated to hold Instance members of Class,is known as Object.


nk

(ii)Object reference:
=>The address location where the Object is created is known as Object reference.
Ve

(iii)Object reference Variable:


=>The NonPrimitive datatype variable which is holding Object reference is known as
Object
reference Variable or Object Name.
----------------------------------------------------------------------------------------------------------------
*imp
Object Oriented Programming Levels:
1.Object definition
2.Object creation
3.Object Location
4.Object Components
5.Object Types
(a)User defined Class Objects
(b)String-Objects
(c)WrapperClass-Objects

i
thi
(d)Array-Objects
(e)Collection<E>-Objects

ipa
(f)Map<K,V>-Objects
(g)Enum<E>-Objects
6.Objects Grouping(Collecting Objects)
Ma
7.Objects Sorting
8.Object Locking
9.Object Serialization
sh

10.Object Cloning
=========================================================================
ate

Note:
=>The Field Storages and Object Storages which are created part of JVM are destroyed
nk

automatically when JVM ShutDowns


=>when we want to have permanent storage of applications then we have to take the
Ve

support
of any one of the following:
=>File Storage
=>Database Storage
i
thi
ipa
=========================================================================
Ma
3.File Storage:
=>The smallest permanent storage of ComputerSystem,which is 'Controlled and
managed'
by the OperatingSystem is known as File Storage
sh

=>In the process of establishing communication b/w JavaProgram and File Storage,the
ate

JavaProgram must be constructed using 'Classes and Interfaces' available from


'java.io'
package known as 'IO Stream-File API'
nk

Diagram:
Ve
i
thi
ipa
--------------------------------------------------------------------------------------------------------------------------
Ma
Dt : 8/3/2024
Dis-Advantages of File Storage:
1.Data Redundancy
sh

2.Data Inconsistency
3.Data Integrity problem
ate

4.Data Sharing Problem


4.Data Security Problem
nk

1.Data Redundancy:
Ve

=>File Storage leads to replication of data,which means duplicate data.

2.Data Inconsistency:
=>Because of duplicate data,File Storage leads to Data Inconsistency.

3.Data Integrity problem


=>File Storage will not Support Data Integrity,because the data is available in Scatter
form.
(Which means data available in different locations)

4.Data Sharing Problem:


=>File Storage will not support Data Sharing process,because data integrity is not
available.

4.Data Security Problem:


=>File Storage cannot provide security for data.

i
======================================================================

thi
Note:
=>Because of DisAdvantages,the WebApplications cannot take File Storage as BackEnd

ipa
Storage.
=>DisAdvantages of File Storage can be Overcomed using Database Storage.
Ma
========================================================================
*imp
4.Database Storage:
sh

=>The Largest permanent Storage of ComputerSystem which is installed from externally


is known as Database Storage.
ate

=>In the process of establishing Communication b/w JavaProgram and Database


product,
the JavaProgram must be constructed using 'Classes and Interfaces' available from
nk

'java.sql' package(JDBC API) and the JavaProgram must take the Support of JDBC-
driver.
Ve

Diagram:
i
thi
-----------------------------------------------------------------------------------------------------------------------
faq:

ipa
define Driver?
=>The small s/w program part of OperatingSystem used to connect two end-points is
Ma
known
as Driver.
Ex:
sh

Audio Driver
N/W Driver
ate

...
nk

faq:
define JDBC driver?
Ve

=>The driver which is used to connect JavaProgram and Database product is known as
JDBC
driver.(Java DataBase Connectivity driver)

Types of JDBC drivers:


=>JDBC drivers are categorized into four types:
1.JDBC-ODBC bridge driver(Type-1)
2.Native API driver(Type-2)
3.Network Protocol driver(Type-3)
4.Thin driver(Type-4)
Note:
=>In realtime we use only 'Thin driver'(Type-4)
==========================================================================
*imp
Making ComputerSystem ready to develop JDBC Applications:
step-1 : Install Database Product(Oracle)

i
thi
step-2 : Check the Login Process
step-3 : Create table with name Customer60(phno,name,city,mid)

ipa
create table Customer60(phno number(15),name varchar2(15),city varchar2(15),
mid varchar2(25),primary key(phno));
Ma
step-4 : Insert min 5 Customer Details
sh

insert into Customer60 values(9898981234,'Raj','Hyd','[email protected]');


ate

step-5 : Copy DB-Jar file into user defined folder on DeskTop


=>we can fild DB Jar file in "lib" folder of "jdbc" (Oracle Installed folder)
nk

C:\oraclexe\app\oracle\product\11.2.0\server\jdbc\lib
ojdbc6.jar - Oracle11
Ve

step-6 : Find Oracle PortNo and Service Name


=>we can find PortNo and ServiceName from 'tnsnames.ora' file of 'ADMIN" folder of
'network'
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
PortNo : 1521
ServiceName : XE
=====================================================================

You might also like