About java basics.why we need java ? what kind of a language is it? why is it called platform independent? java life cycle..............................................................................
2. 5/13/2015 2
Why we need Java ???
Originally for intelligent consumer-electronic devices (cell
phones)
Then used for creating Web pages with dynamic content
Now also used for:
Develop large-scale enterprise applications
3. 5/13/2015 3
The Java Programming Language
• A high-level language
More close to human language
than machine language.
4. 5/13/2015 4
The Java Programming Language
• Object-orientated programming
language
• Historically, a program has been viewed as a
logical procedure that takes input data, processes
it, and produces output data.
• Object-oriented programming (OOP) is a
programming language model organized
around objects rather than "actions" and data
rather than logic.
Yaaa I know it’s
not clear enough
I’ll explain it late
in another ppt.
5. 5/13/2015 5
The Java Programming Language
• Platform independent
• Platform independent means that the code remains
the same irrespective of the platform involved.
• Java has something called a virtual machine called
JVM or Java Virtual Machine. What happens in case
of Java is that the JVM once installed on any
platform like windows or OS X can run the java code
without any alteration. The JVM acts like a virtual
platform on which the code is executed. As the
platform being JVM remains constant throughout all
platforms Java programs can run on any platform
irrespective of the real platform.
6. 5/13/2015 6
The Java Programming Language
• Strongly-typed programming
language
• Java is a strongly typed programming language because
every variable must be declared with a data type.
• A variable cannot start off life without knowing the
range of values it can hold, and once it is declared, the
data type of the variable cannot change.
7. 5/13/2015 7
The Java Programming Language
• Interpreted and compiled
language
• I’ll explain this in “Java Life Cycle”
8. 5/13/2015 8
The Java Programming Language
• Automatic memory management
• Java Memory Management, with its built-in
garbage collection, is one of the language's
finest achievements.
• It allows developers to create new objects
without worrying explicitly about memory
allocation and DE allocation, because the
garbage collector automatically reclaims
memory for reuse.
• This enables faster development with less
boilerplate code, while eliminating memory
leaks and other memory-related problems
9. 5/13/2015 9
The Java Platform
The Java Platform differs from most of the
other platforms.
Because it’s a software only platform.
Which will run on the top of other Hardware
based platforms.
11. 5/13/2015 11
Edit
• Programmer writes
program (and stores
program on disk)
Compile
• Compiler creates bytecodes from
program (.class)
Load
• Class loader stores
bytecodes in memory
Execute
• Interpreter: translates
bytecodes into machine
language
Java Life Cycle