Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 9

Bytecode and fea

tures of java
submitted by- Praveen Suthar
Submitted to-Priyanka Sisodia
Bytecodes

• Java bytecode is the instruction set for


the Java Virtual Machine. It acts similar
to an assembler which is an alias represe
ntation of a C++ code. As soon as a java
program is compiled, java bytecode is gen
erated. In more apt terms, java bytecode
is the machine code in the form of a .cla
ss file. With the help of java bytecode w
e achieve platform independence in java.
How does it work?
• When we write a program in Java, firstly, the compiler c
ompiles that program and a bytecode is generated for tha
t piece of code. When we wish to run this .class file on
any other platform, we can do so. After the first compil
ation, the bytecode generated is now run by the Java Vir
tual Machine and not the processor in consideration. Thi
s essentially means that we only need to have basic java
installation on any platforms that we want to run our co
de on. Resources required to run the bytecode are made a
vailable by theJava Virtual Machine, which calls the pro
cessor to allocate the required resources. JVM's are sta
ck-based so they stack implementation to read the codes.
Simple

• Java is very easy to learn, and its synta


x is simple, clean and easy to understand
. According to Sun, Java language is a si
mple programming language
• Java syntax is based on C++ (so easier fo
r programmers to learn it after C++).
• Java has removed many complicated and rar
ely-used features, for example, explicit
pointers, operator overloading, etc.
Object oriented
• Java is an object-oriented programming language. Everything in
Java is an object. Object-oriented means we organize our softw
are as a combination of different types of objects that incorp
orates both data and behavior.
• Basic concepts of OOPs are:
• Object
• Class
• Inheritance
• Polymorphism
• Abstraction
• Encapsulation
Robust

• Robust simply means strong. Java is robust bec


ause:
• It uses strong memory management.
• There is a lack of pointers that avoids securi
ty problems.
• There is automatic garbage collection in java
which runs on the Java Virtual Machine to get
rid of objects which are not being used by a J
ava application anymore.
Thank yoo...

You might also like