Presentation 2
Presentation 2
MANAGEMENT
A
SEMINAR PRESENTATION
On
JAVA
Submitted
In partial fulfillment
For the award of the Degree of
Bachelor of Technology
In
Computer Science Engineering
SUBMITTED TO- SUBMITTED BY-
Mr. Sanjay Tiwari Sakshi
(Head of Department) (16EAOCS037)
Mentors-
• Mr. Manish Bhatia (Trainer)
• Mr. Aditya Kumar (Project
Coordinator).
CONTENTS
Platform Independent
Robust
Object-Oriented
Highly Secure
Portable
Multithreaded
High Performance
Interpreted
Dynamic
TOOLS FOR JAVA
int 4 bytes
short 2 bytes
long 8 bytes Behaviors is
byte 1 byte
exactly as in
float 4 bytes
C++
double 8 bytes
char Unicode encoding (2 bytes)
boolean {true,false}
Note:
Primitive type
always begin
with lower-case
PLATFORM INDEPENDENT
myprog.c myprog.exe
gcc machine code
C source code
OS/Hardware
myprog.java myprog.class
javac bytecode
Java source code
JVM
OS/Hardware
'this' KEYWORD
Inheritance in java is a
mechanism in which one
object accquires all the
properties and behavior of
parent object.
The idea behind
inheritance is to create
new classes that are built
upon existing classes.
'super' KEYWORD
For example, when you consider the case of e-mail, complex details such as what
happens as soon as you send an e-mail, the protocol your e-mail server uses are
hidden from the user.
In Java, abstraction is achieved using Abstract classes and interfaces.
INTERFACES
An interface in java is a blueprint of
a class. It has static constants and
abstract methods.
It cannot be instantiated.
JDBC
JDBC provides us certain APIs to
connect the java program to any
database to perform curd
operations.
Size Limit: We can store only the fixed size of elements in the array. It doesn't
grow its size at runtime. To solve this problem, collection framework is used in
Java which grows automatically.
STRING
Basically, string is an object which represents sequence of characters but it's not a
primitive type.
char[] ch={'j','a','v','a','t','p','o','i','n','t'};
String s=new String(ch);
String is the only class where operator overloading is supported in java.
How to create a string object?
1) String Literal
Java String literal is created by using
double quotes. For Example:
String s="hello";
2) By new keyword
String s=new String("Welcome");//creates two objects and one reference variable.
In such case, JVM will create a new string object in normal (non-pool) heap
memory, and the literal "Welcome" will be placed in the string constant pool. The
variable s will refer to the object in a heap (non-pool).