myassignmenthelp.net : learn java at your tips

10
Introduction To JAVA www.myassignmenthelp.ne

Upload: stevejohnson

Post on 15-Jan-2016

216 views

Category:

Documents


0 download

DESCRIPTION

If You want to get excel in every aspect of programming language like java, C#, asp, php, just visit www.myassignmenthelp.net we will provide you the best online tutoring experience.

TRANSCRIPT

Page 1: MyAssignmenthelp.Net : Learn Java At Your Tips

Introduction To JAVA

www.myassignmenthelp.net

Page 2: MyAssignmenthelp.Net : Learn Java At Your Tips

Overview of JAVA

www.myassignmenthelp.net

• Java is:

– Platform independent programming language

– Similar to C++ in syntax

– Similar to Smalltalk in mental paradigm

• Pros: also ubiquitous to net

• Cons: interpreted, and still under development (moving target)

Page 3: MyAssignmenthelp.Net : Learn Java At Your Tips

How it works…!

www.myassignmenthelp.net

Java is independent only for one reason:Only depends on the Java Virtual Machine (JVM),code is compiled to bytecode, which is interpreted by the resident JVM,JIT (just in time) compilers attempt to increase speed

Page 4: MyAssignmenthelp.Net : Learn Java At Your Tips

Java Features

• Well defined primitive data types: int, float, double, char, etc.

– int 4 bytes [–2,147,648, 2,147,483,647]

• Control statements similar to C++: if-then-else, switch, while, for

• Interfaces

• Exceptions

• Concurrency

• Packages

• Name spaces

• Reflection

• Applet model

• Automatic type checking and garbage collection

• Simplifies pointers; no directly accessible pointer to memory,

• Simplified network access,

• Multi-threading

www.myassignmenthelp.net

Page 5: MyAssignmenthelp.Net : Learn Java At Your Tips

Applets, Servlets and Applications

www.myassignmenthelp.net

• Applets:

– Applet is designed to be embedded in a Web page, and run by a browser

– Applets run in a sandbox with numerous restrictions; for example, they can’t read files and then use the network

• Servlet:

– A servlet is designed to be run by a web server

• Application:

– An application is a conventional program

Page 6: MyAssignmenthelp.Net : Learn Java At Your Tips

The Java programming environment

• Java programming language specification

– Syntax of Java programs

– Defines different constructs and their semantics

• Java byte code: Intermediate representation for Java programs

• Java compiler: Transform Java programs into Java byte code

• Java interpreter: Read programs written in Java byte code and execute them

• Java virtual machine: Runtime system that provides various services to running programs

• Java programming environment: Set of libraries that provide services such as GUI, data structures,etc.

• Java enabled browsers: Browsers that include a JVM + ability to load programs from remote hosts

www.myassignmenthelp.net

Page 7: MyAssignmenthelp.Net : Learn Java At Your Tips

Java - Security

• Pointer denial - reduces chances of virulent programs corrupting host,

• Applets even more restricted -

– May not

• run local executables,

• Read or write to local file system,

• Communicate with any server other than the originating server.

www.myassignmenthelp.net

Page 8: MyAssignmenthelp.Net : Learn Java At Your Tips

Object-Oriented

• Java supports OOD

– Polymorphism

– Inheritance

– Encapsulation

• Java programs contain nothing but definitions and instantiations of classes

– Everything is encapsulated in a class!

www.myassignmenthelp.net

Page 9: MyAssignmenthelp.Net : Learn Java At Your Tips

Java Advantages

• Portable - Write Once, Run Anywhere

• Security has been well thought through

• Robust memory management

• Designed for network programming

• Multi-threaded (multiple simultaneous tasks)

• Dynamic & extensible (loads of libraries)

– Classes stored in separate files

– Loaded only when needed www.myassignmenthelp.net

Page 10: MyAssignmenthelp.Net : Learn Java At Your Tips

www.myassignmenthelp.net

Thank You