5-8(jan)
5-8(jan)
2.Programming Concepts
i
thi
1.Programming Components(Java Alphabets)
a.Variables
ipa
b.Methods
Ma
c.Constructors
d.Blocks
e.Classes
sh
f.Interfaces
ate
g.AbstractClasses
nk
2.Programming Concepts
d.Multi-Threading process
a.Class
b.Object
i
c.Abstraction
thi
d.Encapsulation
e.PolyMorphism
ipa
f.Inheritance
Ma
--------------------------------------------------------------------
Output of CoreJava:
===================================================================
====
define program?
nk
=>program is a set-of-Instructions.
Ve
define Application?
Application.
Types of Applications:
1.Stand-Alone Applications
2.Web Applications
3.Enterprise Applications
i
4.Mobile Applications
thi
1.Stand-Alone Applications:
ipa
=>The applications which are installed in one computer and performs actions
Ma
in the same computer are known as Stand-Alone Appliactions or DeskTop
(i)CUI Applications
(ii)GUI Applications
nk
(i)CUI Applications:
Ve
=>The applications in which the user interacts through 'console' are known as
(ii)GUI Applications:
=>The applications in which the user interacts through 'gui components' are
known as GUI Applications.(GUI - Graphical user Interface)
swing
JavaFx
i
Note:
thi
=>CoreJava Components,Concepts and features are used to develop
Stand-Alone
ipa
Applications,which means NonServer Applications
---------------------------------------------------------------------------
Ma
2.Web Applications:
(i)JDBC
(ii)Servlet
nk
(iii)JSP
Ve
(ii)Servlet:
=>Servlet means Server-program and which accepts the request from User.
Ve
(iii)JSP:
=>JSP stands for 'Java Server page' and which is response from Web
Application
Note:
----------------------------------------------------------------------------
3.Enterprise Applications:
i
thi
on the features like 'Security','LoadBalancing' and 'Clustering' are knwon
ipa
----------------------------------------------------------------------------
4.Mobile Applications:
Ma
=>The applications which are executed in mobile environment are known as
Mobile Applications.
sh
===================================================================
==========
ate
*imp
define Storage?
nk
Types of Storages:
four types:
1.Field Storage
2.Object Storage
3.File Storage
4.Database Storage
1.Field Storage:
i
=>The memory generated to hold single data value is known as Field Storage.
thi
=>The Primitive datatypes will generate Field Storages.
(byte,short,int,long,float,double,char,boolean)
ipa
Ma
2.Object Storage:
-----------------------------------------------------------------------------
Dt : 6/1/2024(day-2)
nk
Ex:
class Addition
Ve
int a;
int b;
void add()
{
int c = a+b;
System.out.println("Sum:"+c);
i
Addition ob = new Addition();
thi
Diagram:
ipa
Ma
sh
ate
nk
Ve
----------------------------------------------------------------
faq:
(i)Object
(ii)Object reference
(iii)Object reference Variable
(i)Object:
i
(ii)Object reference:
thi
=>The address location where object is created,is known as Object reference.
ipa
(iii)Object reference Variable:
Ma
=>The NonPrimitive datatype variable which hold Object reference is known as
------------------------------------------------------------------------
sh
*imp
ate
1.Object definition
nk
2.Object creation
3.Object Location
Ve
4.Object Components
5.Object Types
(b)string-Objects
(c)WrapperClass Objects
(i)Byte Object
(ii)Short Object
i
(iii)Integer Object
thi
(iv)Long Object
(v)Float Object
ipa
(vi)Double Object
Ma
(vii)Character Object
(viii)Boolean Object
(d)Array Objects
sh
(i)Array holding User defined class Objects
ate
(e)Collection<E> Objects
1.List<E> Objects
(i)ArrayList<E> Objects
(ii)LinkedList<E> Objects
(iii)Vector<E> Objects
=>Stack<E> Object
2.Queue<E> Objects
(i)PriorityQueue<E> Objects
=>Deque<E>
(ii)ArrayDeque<E> Objects
i
(iii)LinkedList<E> Objects
thi
3.Set<E> Objects
(i)HashSet<E> Objects
ipa
(ii)LinkedHashSet<E> Objects
Ma
(iii)TreeSet<E> Objects
(f)Map<K,V> Objects
(i)HashMap<K,V> Objects
sh
(ii)LinkedHashMap<K,V> Objects
ate
(iii)TreeMap<K,V> Objects
(iV)Hashtable<K,V> Objects
nk
(g)Enum<E> objects
7.Objects Sorting
8.Object Locking
9.Object Serialization
10.Object Cloning
===================================================================
==
Note:
i
thi
2.Object Level - Instance Variables(Object Variables)
ipa
===================================================================
==
Note:
Ma
=>The Field Storages and Object Storages,which are created part of JavaApp in
=>File Storage
=>Database Storage
nk
Ve
i
thi
ipa
Ma
===================================================================
==
sh
Dt : 7/1/2024
ate
faq:
define API?
nk
Framework.
=>In Java,each package is one API and which is collection of 'Classes and
Interfaces'.
i
javax.servlet.jsp - JSP Programming API
thi
-----------------------------------------------------
ipa
javax - represents Extended Java Library
Ma
===================================================================
==
3.File Storage:
sh
=>The smallest permanent storage of ComputerSystem which is 'controlled and
Diagram:
i
thi
ipa
Ma
sh
-------------------------------------------------------------------------
1.Data redundancy
2.Data Inconsistency
nk
1.Data redundancy:
i
3.Data Integrity problem:
thi
=>File Storage will not support data Integrity,which means combining the data
available in Scatter-form
ipa
Ma
4.Data Sharing Problem:
===================================================================
nk
Note:
Ve
===================================================================
======
Dt : 8/1/2024
*imp
4.Database Storage:
i
thi
must be constructed using 'classes and Interfaces' from java.sql package and
ipa
Diagram:
Ma
sh
ate
nk
Ve
-----------------------------------------------------
faq:
define driver?
Audio driver
Video driver
N/W driver
i
...
thi
-------------------------------------------------------------
faq:
ipa
define JDBC driver?
Ma
=>The driver which is used to interlink JavaProgram and Database product,is
4.Thin driver(Type-4)
--------------------------------------------------------------------
Ve
*imp
primary key(uname));
i
insert into User58 values('Alex','[email protected]',9898981234);
thi
step-5 : Copy DB Jar file into User defined folder
ipa
Note:
Ma
=>DB Jar file is available in 'lib' folder of Oracle-Installed-folder
C:\oraclexe\app\oracle\product\11.2.0\server\jdbc\lib
ojdbc6 - Oracle11
sh
faq:
ate
define JAR?
=>JAR stands for Java Archieve and which is compressed format of more
class-files
nk
Ve
Note:
=>Open tnsnames.ora file from 'Admin' folder of 'network' to find PortNo and
Service_name
C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN
PortNo : 1521
Service_name : XE
===================================================================
============
*imp
i
thi
we use the following steps to establish connection b/w JavaProgram and DB
product:
ipa
step-1 : Loading driver
===========
*imp
JDBC API:
nk
=>java.sql package is known as JDBC-API and which provide the 'Classes and
Ve
1.createStatement()
2.prepareStatement()
3.prepareCall()
4.setAutoCommit()
5.getAutoCommit()
6.setSavepoint()
7.releaseSavepoint()
i
8.commit()
thi
9.rollback()
10.close()
ipa
-------------------------------------------------------------------------
Ma
sh
ate
nk
Ve