myassignmenthelp.net : learn java at your tips
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
Introduction To JAVA
www.myassignmenthelp.net
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)
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
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
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
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
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
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
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
www.myassignmenthelp.net
Thank You