<s>
The	O
Java	B-Language
programming	I-Language
language	I-Language
and	O
Java	B-Device
software	I-Device
platform	I-Device
have	O
been	O
criticized	O
for	O
design	O
choices	O
including	O
the	O
implementation	O
of	O
generics	B-Language
,	O
forced	O
object-oriented	O
programming	O
,	O
the	O
handling	O
of	O
unsigned	O
numbers	O
,	O
the	O
implementation	O
of	O
floating-point	B-Algorithm
arithmetic	I-Algorithm
,	O
and	O
a	O
history	O
of	O
security	O
vulnerabilities	O
in	O
the	O
primary	O
Java	B-Language
VM	I-Language
implementation	O
,	O
HotSpot	B-Language
.	O
</s>
<s>
Software	O
written	O
in	O
Java	B-Device
,	O
especially	O
its	O
early	O
versions	O
,	O
has	O
been	O
criticized	O
for	O
its	O
performance	O
compared	O
to	O
software	O
written	O
in	O
other	O
programming	O
languages	O
.	O
</s>
<s>
Developers	O
have	O
also	O
remarked	O
that	O
differences	O
in	O
various	O
Java	B-Device
implementations	O
must	O
be	O
taken	O
into	O
account	O
when	O
writing	O
complex	O
Java	B-Device
programs	O
that	O
must	O
work	O
with	O
all	O
of	O
them	O
.	O
</s>
<s>
Java	B-Device
introduced	O
checked	O
exceptions	O
,	O
where	O
a	O
method	O
must	O
declare	O
the	O
checked	O
exceptions	O
it	O
throws	O
in	O
the	O
method	O
signature	O
.	O
</s>
<s>
No	O
major	O
language	O
has	O
followed	O
Java	B-Device
in	O
implementing	O
checked	O
exceptions	O
.	O
</s>
<s>
When	O
generics	B-Language
were	O
added	O
to	O
Java	B-Device
5.0	O
,	O
there	O
was	O
already	O
a	O
large	O
framework	O
of	O
classes	O
(	O
many	O
of	O
which	O
were	O
already	O
deprecated	B-General_Concept
)	O
,	O
so	O
generics	B-Language
were	O
implemented	O
using	O
type	B-General_Concept
erasure	I-General_Concept
to	O
allow	O
for	O
migration	O
compatibility	O
and	O
re-use	O
of	O
these	O
existing	O
classes	O
.	O
</s>
<s>
Because	O
generics	B-Language
are	O
implemented	O
using	O
type	B-General_Concept
erasure	I-General_Concept
the	O
actual	O
type	O
of	O
a	O
template	O
parameter	O
E	O
is	O
unavailable	O
at	O
run	O
time	O
.	O
</s>
<s>
Thus	O
,	O
the	O
following	O
operations	O
are	O
not	O
possible	O
in	O
Java	B-Device
:	O
</s>
<s>
Additionally	O
,	O
in	O
2016	O
,	O
the	O
following	O
example	O
was	O
found	O
revealing	O
Java	B-Device
to	O
be	O
unsound	O
and	O
in	O
turn	O
making	O
JVMs	B-Language
which	O
threw	O
ClassCastExceptions	O
or	O
any	O
other	O
kind	O
of	O
runtime	O
error	O
technically	O
non-conforming	O
.	O
</s>
<s>
This	O
was	O
corrected	O
in	O
Java	B-Device
10	O
.	O
</s>
<s>
By	O
design	O
,	O
Java	B-Device
encourages	O
programmers	O
to	O
think	O
of	O
a	O
solution	O
in	O
terms	O
of	O
nouns	O
(	O
classes	O
)	O
interacting	O
with	O
each	O
other	O
,	O
and	O
to	O
think	O
of	O
verbs	O
(	O
methods	O
)	O
as	O
operations	O
that	O
can	O
be	O
performed	O
on	O
or	O
by	O
that	O
noun	O
.	O
</s>
<s>
When	O
combined	O
with	O
other	O
features	O
such	O
as	O
function	B-Language
overloading	I-Language
(	O
one	O
verb	O
,	O
multiple	O
nouns	O
)	O
and	O
generic	B-Language
functions	I-Language
(	O
one	O
verb	O
,	O
a	O
family	O
of	O
nouns	O
with	O
certain	O
properties	O
)	O
,	O
the	O
programmer	O
can	O
decide	O
whether	O
to	O
solve	O
a	O
specific	O
problem	O
in	O
terms	O
of	O
nouns	O
or	O
verbs	O
.	O
</s>
<s>
Java	B-Device
version	O
8	O
introduced	O
some	O
functional	O
programming	O
features	O
.	O
</s>
<s>
Java	B-Device
lacks	O
native	O
unsigned	O
integer	O
types	O
.	O
</s>
<s>
Unsigned	O
data	O
is	O
often	O
generated	O
from	O
programs	O
written	O
in	O
C	B-Language
,	O
and	O
the	O
lack	O
of	O
these	O
types	O
prevents	O
direct	O
data	O
interchange	O
between	O
C	B-Language
and	O
Java	B-Device
.	O
</s>
<s>
Unsigned	O
large	O
numbers	O
are	O
also	O
used	O
in	O
a	O
number	O
of	O
numeric	B-Algorithm
processing	O
fields	O
,	O
including	O
cryptography	O
,	O
which	O
can	O
make	O
Java	B-Device
more	O
inconvenient	O
to	O
use	O
for	O
these	O
tasks	O
.	O
</s>
<s>
Although	O
it	O
is	O
possible	O
to	O
get	O
around	O
this	O
problem	O
using	O
conversion	O
code	O
and	O
larger	O
data	O
types	O
,	O
it	O
makes	O
using	O
Java	B-Device
cumbersome	O
for	O
handling	O
unsigned	O
data	O
.	O
</s>
<s>
In	O
all	O
cases	O
,	O
the	O
memory	O
consumed	O
may	O
double	O
,	O
and	O
typically	O
any	O
logic	O
relying	O
on	O
two	B-General_Concept
's	I-General_Concept
complement	I-General_Concept
overflow	O
must	O
be	O
rewritten	O
.	O
</s>
<s>
Alternatively	O
,	O
it	O
is	O
possible	O
to	O
use	O
Java	B-Device
's	O
signed	O
integers	O
to	O
emulate	B-Application
unsigned	O
integers	O
of	O
the	O
same	O
size	O
,	O
but	O
this	O
requires	O
detailed	O
knowledge	O
of	O
bitwise	O
operations	O
.	O
</s>
<s>
Some	O
support	O
for	O
unsigned	O
integer	O
types	O
was	O
provided	O
in	O
JDK	O
8	O
,	O
but	O
not	O
for	O
unsigned	O
bytes	O
and	O
with	O
no	O
support	O
in	O
the	O
Java	B-Language
language	I-Language
.	O
</s>
<s>
Java	B-Device
has	O
been	O
criticized	O
for	O
not	O
supporting	O
user-defined	O
operators	O
.	O
</s>
<s>
Operator	O
overloading	O
improves	O
readability	O
,	O
so	O
its	O
absence	O
can	O
make	O
Java	B-Language
code	I-Language
less	O
readable	O
,	O
especially	O
for	O
classes	O
representing	O
mathematical	O
objects	O
,	O
such	O
as	O
complex	O
numbers	O
and	O
matrices	O
.	O
</s>
<s>
Java	B-Device
has	O
only	O
one	O
non-numerical	O
use	O
of	O
an	O
operator	O
:	O
+	O
and	O
+	O
=	O
for	O
string	O
concatenation	O
.	O
</s>
<s>
It	O
is	O
impossible	O
to	O
create	O
user-defined	O
operator	O
overloads	B-Language
.	O
</s>
<s>
Java	B-Device
lacks	O
compound	O
value	O
types	O
,	O
such	O
as	O
structs	B-Language
in	O
C	B-Language
,	O
bundles	O
of	O
data	O
that	O
are	O
manipulated	O
directly	O
instead	O
of	O
indirectly	O
via	O
references	O
.	O
</s>
<s>
For	O
example	O
,	O
Java	B-Device
's	O
HashMap	O
is	O
implemented	O
as	O
an	O
array	O
of	O
references	O
to	O
HashMap.Entry	O
objects	O
,	O
which	O
in	O
turn	O
contain	O
references	O
to	O
key	O
and	O
value	O
objects	O
.	O
</s>
<s>
If	O
Entry	O
were	O
a	O
value	O
type	O
,	O
the	O
array	O
could	O
store	O
key-value	O
pairs	O
directly	O
,	O
eliminating	O
the	O
first	O
indirection	O
,	O
increasing	O
locality	B-General_Concept
of	I-General_Concept
reference	I-General_Concept
and	O
reducing	O
memory	O
use	O
and	O
heap	O
fragmentation	O
.	O
</s>
<s>
Further	O
,	O
if	O
Java	B-Device
supported	O
generic	O
primitive	O
types	O
,	O
keys	O
and	O
values	O
could	O
be	O
stored	O
in	O
the	O
array	O
directly	O
,	O
removing	O
both	O
levels	O
of	O
indirection	O
.	O
</s>
<s>
Java	B-Device
has	O
been	O
criticized	O
for	O
not	O
supporting	O
arrays	O
of	O
231	O
(	O
about	O
2.1	O
billion	O
)	O
or	O
more	O
elements	O
.	O
</s>
<s>
This	O
is	O
a	O
limitation	O
of	O
the	O
language	O
;	O
the	O
Java	B-Language
Language	I-Language
Specification	I-Language
,	O
Section	O
10.4	O
,	O
states	O
that	O
:	O
</s>
<s>
Supporting	O
large	O
arrays	O
would	O
also	O
require	O
changes	O
to	O
the	O
JVM	B-Language
.	O
</s>
<s>
Java	B-Device
also	O
lacks	O
(	O
outside	O
of	O
its	O
2D	O
arrays	O
)	O
multidimensional	O
arrays	O
(	O
contiguously	O
allocated	O
single	O
blocks	O
of	O
memory	O
accessed	O
by	O
a	O
single	O
indirection	O
)	O
,	O
which	O
limits	O
performance	O
for	O
scientific	O
and	O
technical	O
computing	O
.	O
</s>
<s>
There	O
is	O
no	O
efficient	O
way	O
to	O
initialize	O
arrays	O
in	O
Java	B-Device
.	O
</s>
<s>
When	O
declaring	O
an	O
array	O
,	O
the	O
JVM	B-Language
compiles	O
it	O
to	O
bytecodes	O
with	O
instructions	O
that	O
set	O
its	O
elements	O
one	O
by	O
one	O
at	O
run	O
time	O
.	O
</s>
<s>
Because	O
Java	B-Device
methods	O
cannot	O
be	O
bigger	O
than	O
64KB	O
,	O
arrays	O
of	O
even	O
modest	O
sizes	O
with	O
values	O
assigned	O
directly	O
in	O
the	O
code	O
will	O
throw	O
the	O
message	O
"	O
Error	O
:	O
code	O
too	O
large	O
"	O
on	O
compilation	O
.	O
</s>
<s>
Per	O
Brinch	O
Hansen	O
argued	O
in	O
1999	O
that	O
Java	B-Device
's	O
implementation	O
of	O
parallelism	O
in	O
general	O
,	O
and	O
monitors	O
in	O
particular	O
,	O
does	O
not	O
provide	O
the	O
guarantees	O
and	O
enforcements	O
required	O
for	O
secure	O
and	O
reliable	O
parallel	O
programming	O
.	O
</s>
<s>
Java	B-Device
provides	O
a	O
mechanism	O
for	O
object	B-Application
serialization	I-Application
,	O
where	O
an	O
object	O
can	O
be	O
represented	O
as	O
a	O
sequence	O
of	O
bytes	O
that	O
includes	O
its	O
data	O
fields	O
,	O
together	O
with	O
type	O
information	O
about	O
itself	O
and	O
its	O
fields	O
.	O
</s>
<s>
Although	O
Java	B-Device
's	O
floating	B-Algorithm
point	I-Algorithm
arithmetic	I-Algorithm
is	O
largely	O
based	O
on	O
IEEE	O
754	O
(	O
Standard	O
for	O
Binary	B-Algorithm
Floating-Point	I-Algorithm
Arithmetic	I-Algorithm
)	O
,	O
some	O
mandated	O
standard	O
features	O
are	O
not	O
supported	O
even	O
when	O
using	O
the	O
strictfp	B-Language
modifier	O
,	O
such	O
as	O
Exception	O
Flags	O
and	O
Directed	O
Roundings	O
.	O
</s>
<s>
The	O
extended	B-Algorithm
precision	I-Algorithm
types	O
defined	O
by	O
IEEE	O
754	O
(	O
and	O
supported	O
by	O
many	O
processors	O
)	O
are	O
not	O
supported	O
by	O
Java	B-Device
.	O
</s>
<s>
Java	B-Device
does	O
not	O
natively	O
support	O
tuples	B-Application
,	O
resulting	O
in	O
a	O
proliferation	O
of	O
third-party	O
implementations	O
which	O
must	O
be	O
imported	O
and	O
handled	O
by	O
the	O
programmer	O
.	O
</s>
<s>
Until	O
Java	B-Device
8	O
introduced	O
lambda	B-General_Concept
expressions	I-General_Concept
,	O
it	O
was	O
difficult	O
to	O
pass	O
a	O
method	O
as	O
a	O
parameter	O
to	O
another	O
method	O
.	O
</s>
<s>
In	O
2008	O
the	O
United	O
States	O
Department	O
of	O
Defense	O
's	O
Center	O
Software	O
Technology	O
Support	O
published	O
an	O
article	O
in	O
the	O
"	O
Journal	O
of	O
Defense	O
Software	O
Engineering	O
"	O
discussing	O
the	O
unsuitability	O
of	O
Java	B-Device
as	O
the	O
first	O
language	O
taught	O
.	O
</s>
<s>
In	O
2005	O
Joel	O
Spolsky	O
criticized	O
Java	B-Device
as	O
an	O
overfocused	O
part	O
of	O
universities	O
 '	O
curricula	O
in	O
his	O
essay	O
The	O
Perils	O
of	O
JavaSchools	O
.	O
</s>
<s>
Before	O
2000	O
,	O
when	O
the	O
HotSpot	B-Language
VM	I-Language
was	O
implemented	O
in	O
Java	B-Device
1.3	O
,	O
there	O
were	O
many	O
criticisms	O
of	O
its	O
performance	O
.	O
</s>
<s>
Java	B-Device
has	O
been	O
demonstrated	O
to	O
run	O
at	O
a	O
speed	O
comparable	O
with	O
optimized	O
native	O
code	O
,	O
and	O
modern	O
JVM	B-Language
implementations	O
are	O
regularly	O
benchmarked	O
as	O
one	O
of	O
the	O
fastest	O
language	O
platforms	O
available	O
typically	O
no	O
more	O
than	O
three	O
times	O
slower	O
than	O
C	B-Language
and	O
C++	O
.	O
</s>
<s>
Java	B-Language
bytecode	I-Language
can	O
either	O
be	O
interpreted	O
at	O
run	O
time	O
by	O
a	O
virtual	O
machine	O
,	O
or	O
be	O
compiled	O
at	O
load	O
time	O
or	O
run	O
time	O
into	O
native	O
code	O
which	O
runs	O
directly	O
on	O
the	O
computer	O
's	O
hardware	O
.	O
</s>
<s>
Modern	O
JVM	B-Language
implementations	O
all	O
use	O
the	O
compilation	O
approach	O
,	O
so	O
after	O
the	O
initial	O
startup	O
time	O
the	O
performance	O
is	O
similar	O
to	O
native	O
code	O
.	O
</s>
<s>
Game	O
designer	O
and	O
programmer	O
John	O
D	O
.	O
Carmack	O
concluded	O
in	O
2005	O
about	O
Java	B-Device
on	O
cell-phones	O
:	O
"	O
The	O
biggest	O
problem	O
is	O
that	O
Java	B-Device
is	O
really	O
slow	O
.	O
</s>
<s>
With	O
Java	B-Device
,	O
on	O
most	O
phones	O
you	O
are	O
left	O
with	O
about	O
the	O
CPU	O
power	O
of	O
an	O
original	O
4.77	O
mhz	O
(	O
sic	O
)	O
IBM	B-Device
PC	I-Device
,	O
and	O
lousy	O
control	O
over	O
everything.	O
"	O
</s>
<s>
The	O
Java	B-Device
platform	I-Device
provides	O
a	O
security	O
architecture	O
which	O
is	O
designed	O
to	O
allow	O
the	O
user	O
to	O
run	O
untrusted	O
bytecode	O
in	O
a	O
"	O
sandboxed	O
"	O
manner	O
to	O
protect	O
against	O
malicious	O
or	O
poorly	O
written	O
software	O
.	O
</s>
<s>
In	O
2010	O
,	O
there	O
was	O
a	O
significant	O
rise	O
in	O
malicious	O
software	O
targeting	O
security	O
flaws	O
in	O
the	O
sandboxing	O
mechanisms	O
used	O
by	O
Java	B-Device
implementations	O
,	O
including	O
Oracle	B-Application
's	O
.	O
</s>
<s>
Critics	O
have	O
suggested	O
that	O
users	O
do	O
not	O
update	O
their	O
Java	B-Device
installations	O
because	O
they	O
do	O
n't	O
know	O
they	O
have	O
them	O
,	O
or	O
how	O
to	O
update	O
them	O
.	O
</s>
<s>
Oracle	B-Application
has	O
been	O
criticized	O
for	O
not	O
promptly	O
providing	O
updates	O
for	O
known	O
security	O
bugs	O
.	O
</s>
<s>
When	O
Oracle	B-Application
finally	O
released	O
a	O
patch	O
for	O
widely-exploited	O
flaws	O
in	O
Java	B-Device
7	O
,	O
it	O
removed	O
Java	B-Device
6	O
from	O
users	O
 '	O
machines	O
,	O
despite	O
it	O
being	O
widely	O
used	O
by	O
enterprise	O
applications	O
that	O
Oracle	B-Application
had	O
stated	O
were	O
not	O
impacted	O
by	O
the	O
flaws	O
.	O
</s>
<s>
In	O
2007	O
,	O
a	O
research	O
team	O
led	O
by	O
Marco	O
Pistoia	O
exposed	O
another	O
important	O
flaw	O
of	O
the	O
Java	B-Device
security	O
model	O
,	O
based	O
on	O
stack	O
inspection	O
.	O
</s>
<s>
Some	O
permissions	O
are	O
implicitly	O
equivalent	O
to	O
Java	B-Device
's	O
AllPermission	O
.	O
</s>
<s>
These	O
issues	O
are	O
documented	O
in	O
Pistoia	O
's	O
two	O
books	O
on	O
Java	B-Device
Security	O
:	O
and	O
.	O
</s>
<s>
Before	O
Java	B-Device
7	O
,	O
it	O
was	O
normal	O
for	O
the	O
installer	O
not	O
to	O
detect	O
or	O
remove	O
older	O
Java	B-Device
installations	O
.	O
</s>
<s>
It	O
was	O
quite	O
common	O
on	O
a	O
Windows	O
computer	O
to	O
see	O
multiple	O
installations	O
of	O
Java	B-Device
6	O
on	O
the	O
same	O
computer	O
,	O
varying	O
only	O
by	O
minor	O
revision	O
.	O
</s>
<s>
This	O
has	O
the	O
effect	O
that	O
new	O
Java	B-Device
installations	O
can	O
provide	O
new	O
language	O
features	O
and	O
bug	O
fixes	O
,	O
but	O
they	O
do	O
not	O
correct	O
security	O
vulnerabilities	O
,	O
because	O
malicious	O
programs	O
can	O
use	O
the	O
older	O
versions	O
.	O
</s>
<s>
Java	B-Device
7	O
updated	O
older	O
versions	O
of	O
itself	O
,	O
but	O
not	O
Java	B-Device
6	O
or	O
earlier	O
.	O
</s>
<s>
As	O
of	O
2015	O
,	O
Java	B-Device
8	O
still	O
requires	O
users	O
to	O
update	O
Java	B-Device
themselves	O
.	O
</s>
<s>
The	O
Windows	O
Java	B-Device
updater	O
frequently	O
triggers	O
a	O
disruptive	O
User	O
Account	O
Control	O
elevation	O
prompt	O
:	O
whatever	O
users	O
choose	O
,	O
they	O
still	O
get	O
the	O
same	O
"	O
Java	B-Device
needs	O
to	O
be	O
updated	O
"	O
message	O
.	O
</s>
