Core Java
Core Java
table
① State
of the can't be
changed
②
[ake te VariablesPricea
#changedodat
so that once
assigned it can't be
a
cmodify
te oe
copies ele in
is
↓ I return de
Marktoalfinal sothat
a
overr, den
③ Downside -
You'll -
have too
many
objects
① When should
you
use it
?
·
① = =
Always checks the
is True
reference e. A = B=
if
hold
they referenco
object
① .
Itcanbeorde
a
⑥
② Sting object
& equals checks the
overridden
reference
and checks the
contents
of 2
objects
.
③ Primities
① = = checks the contents
② .
equal
- not applicable
Sting Literal v/s Sting Object
O Sting Object => new
string("s") heap
= stond in
heap obj -
=>
962 Sting objects one
created with same value
in
> there
-
will be 2 objects
Leap
Leteral
② Sting "s
"
==
>
-
Stand in Literal pool
Water a
=
aue
exits in
pool with
only
1
both the
pointing to
name
Premities us Objects
① Primities
>
-
Basicbuilding blocks
>
-
Fixed ege
the
> stored in state of
-
② objects >
-
composed of primia
a
>
-
Deep Copy & Shallow
Copy
=> Both are
object copies and not
Shallow
>
Create anotpy mainactual obsets
-
Deep Copy
Everything last a
>
-
the
pumi
In immulable classes
Usage - to create a with
copy
same value
both shall a
Layy Copy=
Combination of
>
Inner
Working of Hash Map
Purpose
①
For a
a add()
guay
Pea
Mince
away
. an
Impl
inden
· >hash
-
(key) % n =
#(118 n -
collusion
o
It name
fraid no
is
eleSeparate
Worst Case Scenario
=>
Bad Hushing
Rame
algo
under
- all
point
=
7 Onl
Search Tree
=>
Usage of Binary
=> of logn)
·I