Professional Documents
Culture Documents
Simple
letter
Dynamic
and
Distributed
The chara
Ind
Robust
c
rscore(_)
Multithreads
t
Secure
rm
e
fo
r
at
Unders
ith a
c
Pl
“Java Virtual Machine” converts
unde
s (b
in w
Objects
) $,
g
Object
esid
Byte code to Machine Language.
e
z
Can be ore, or
b
es
p
(instance of a class)
t
Features of Java O
h
from do
ld
riented Class
h
a to
ou
ef
al llar
Z,
programm
in g
ig i
irs
Enc
Sh
to
t,
t)
ap s
a d sign
A
ula (blue print that describes the
(
WORA(Write Once tio
n
Run Any where) behaviour or state of the object)
annot
rds c
In
ywo s he
Binding
ntifier r
Pol
Na
Ke
y
id e me Programming in Java ita
be fo nc
m
s used
rc Java e (All related data and methods
(Fundamentals)
orp
an lass, v Identifiers
d m ariables, enclosed within one boundary)
his
ethod
s
m
(reusability)
Keywords
s Variables Wrapper Classes (Same name
ord Data Types
ble Type Casting in many forms)
dw
l
eg. a1, $ price, es
e
v e r ia
Pr
Va
iab
er
Fo
_value, sum. al
c
im
ar
es
R
re
V
iti
Lo
Assi
v
ac
e
iables
e
h
th
f
nc
to a
g ni
er
un simple
Da
n
vert
g
da
ee
var
ss Var
x
con
Insta
me
ia
ta T
i st to i n to objects
aV
b
nta
es
C la
al
s,
le
ap l da
u
t yp
od
e
ype
ta typ a
of
re-
e
c
eg. abstract, class, de at
a
of
eth
f in d
lo
no on
m
for, try etc. th ed c
eg. for ‘byte’ data
rb
et lass
n
o
er yp
Non-
e type there is ‘Byte’
r,
declare
di
typ
e
to c
cto
wrapper class.
8p
are
on
de
Imp
fi
ve
licit
tru
rim
s
rt
i
Typ
ne
decl
e
n
da
str
Ca ta i
co
db
tive sti t y p ngs into
ng e
y th
data
the reference of
e lang
types
eg. class A
,
uage
{ int x;
Con
a cla
}
dyn
Java compiler automatically
ss
} to change an entity of
upgrades lower type to
eg. arrays, one datatype to another
class A eg. byte (1 byte) higher type.
classes, by programmer.
{ int (4 bytes)
interfaces. double d= 100.5;
static int X; eg.
Oswaal ISC Mind Maps, COMPUTER SCIENCE, Class-XII
long l= (long)d;
}
Trace the Mind Map
r
//statement max=(a>b)?a:b; co ct
f
of java.io. Print stream
na
r ifi
c
} ethods
ko
a
if - else sta (ii) sqrt is a method of math class.
pe
ter
ry M
)
r
t em
ibra
e
else
as
(?: to
ent
dL
blo
ar
op
{ nd
//else body Sta e.g.
e s of
} Typ ion definition void fun(int a)
Conditional h ods unct {
e Methods M et In f
cas statement ers }
h- functions et
Use
am
i
tc Par
l
sw
m a
Meth
r
Fo
r_Defi
/
ods
switch( variable ) eters
aram
ned
In fu
d sP nction
{ o e n ts Actual
Parameters calling
eth rgum
para
mete fun(x);
case value 1 : block of code 1 Programming in Java M A actua rs are called
break; Syntax:- l param
eters.
case value 2 : block of code 2 (Method, Recursion and ti c Crea
break; _ sta ting me
thods Modifier_re
t
o
n- s urn_
Simple Programming) Typ
sn
od
h
M
of {} Method b en
et
ody am
cv
.
i
e
t
tho
default : default block Mod
sta
ifier
ds c
}
Re
dy
tu
bo
st
r
od
Li
h
nt
alling
et
e
Recursive fu
(Recursion
M
)
et
while loop
e
Loops tic
r
am
nctio
while (condition)
(M
n
Par
{ eth
e th
p
Oswaal ISC Mind Maps, COMPUTER SCIENCE, Class-XII
m
yp eturn
-static
loo
hod
//while body
Name of the M
a
n
ile
v
wh
od m
m et
No
o- eg.
d
etho
ay
(W
d
p
h
alue)
l oo
en
do
s.
(ii) fun (n);
f or
as
fun
{
(public/private)
y t
jec
cti
//do body ctl ob
f a cl
by
ire
d
} while (condition); an
on c
d
ed
g
ct o
le
(Type, order, and
in
j e
al l
al
at
b
c
access type of the method
re
alls it
ec
(method body)
c
be
b
no
(statements of body)
ut
number of parameters)
o
ga
self)
ca
can
it n
th
{
wi
ea
//for body cr
} eg. public void fun() eg. (ii) public void fun (int x)
{ int factorial (int n) (i) public static int Add (int a, int b) {
//method body { int p;
eg. public static void fun() {if (n = 1)
} int c: p = x*x;
{ return (1);
else return (n* factorial (n-1)); c = a+b System.out.println (p);
//method body
} return (c); }
}
}
Trace the Mind Map
ar
int A [ ] = {5,12,8,17,10};
One dimensional in an array eg.
Array de
array A
5 12 8 17 10
ccla
ati r
0 1 2 3 4
on
As A
sig rra
nm y
en
Two dimensional t
array int B [ ] = new int [5];
eg. (i) int A [ ] = new int [5];
(ii) scanner sc = new scanner (System.in);
Ar
A [0] = 6; A [1] = 8;
ra
System.out.println (“Enter 5 numbers”);
yO
for (int i = 0; i<5; i++)
pe
r
{A [i] = sc.nextInt ();}
elements
at
i
Storage of
on
s
Co
Array h
ar searc
Row
Line
lum
in a n a r ray Bi
-major
na
ry
n major
Se
ar
ch
A[p] [q] ®Address at row p and col q.
Sorti
d
ng a
n arr
e sort
an
ay Bubbl
um
B ®Base address
types of elements
Collection of similar
xim
W®storage space in bytes Ins
ma
ert
ion
Lr®Lower index of the Row sor
out
t
ngi
Ur®Upper index of the Row
Selection
Fi nd
sor
t
ass.
{ } }
Object Oriented Programing of cl
orphism ies
lym ert
Po (Polymorphism Data rop X Base class
ep
Inheritance) ar ce
sh tan
to heri Sub / Derived
Same name in ss In Y
la le class
c
different forms ng
he
Si
st
r
w
ain only Object method
Cont
cto
lo
r u
Al
and static final date vel Inheritance X Base class of Y
Multi le
nst
Types of Inheritance
Fun
Multiple inheritance
Co
me
Interface
Give away to apply Y Sub class of X,
ing
ction
le ti
O
d
(Com
Base class of Z
a
(R ve
u
o
rr
l
id
m nt
or
in
ted p Sub class of Y
(Co
Z
g
eri
hi
M
nh
Over
ep
pile time
i
ul
im sm
ol
)
be
y
n
tip
Constructors
Over loading
le
eg.
Ca In
e.g. class A
he Base classes
T rit
A( ){} an
he
ce
H
D
i
p
A (int o) Public interface XY X Y
e
e
Can n
r
ar
c
cla
ar
ot
{_____
____ public abstract Pr
am
___
re
ea
e
arch
t
a
ss
Su esen
D
t
exe
sw
ical
have
g
e
m
the c
c
{
f
hi
u
rs o
a
In
ne
t
eth
h
e
las in th
fc
Obj
e
creati
Subcl
o
onstr
d fr
e.g. (i) void fun (int a) { }
n
eb
rita
ects
.
od in
ult con
nc
ase
e
N
stru
t
ng the
ass can
d autom ot
uctor o
ready
su
ppo
ctor S
he Su
is al - class.
not inherit
a
in
b- class
.
st
Base
jec
s
t
W
u
uper class
f a Base class
o
class
b
f
atically at the t
Ob ntiat
sub
ei
ts
ime of
f a base class is
cla
-class .
m
s
e class metho
Oswaal ISC Mind Maps, COMPUTER SCIENCE, Class-XII
X Z
eth
keyword is used
First Level Second Level Third Level
can
ods
.
onl
For bas
Super
y
subclass
11
12
ut)
era
tio
ns
18 20 NULL
Data
Part Address
Part
MAX
e
5
rti
4
on
on
Exp
sion
Pop
3
Deleti
2 7 TOP
ressio
Recur
1 6
eg.
stack
12 16 14
n conversion
4 5
To dele
2 3
te el
e
front rear
me
Trace the Mind Map
end end
nt
eg. from infix