Free Online Programming Tutorials

Let’s Learn Web Programming!





Archive for the ‘Core Java’ Category

• Loads all classes necessary for the execution of a program
• Maintains classes of the local file system in separate namespaces
• Prevents spoofing
• The Bytecode Verifier ensures that:
   -The code adheres to the JVM specification.
   -The code does not violate system integrity.
   -The code causes no operand stack overflows or underflows.
   -The parameter types for all operational code are correct.
   -No illegal data conversions (the conversion of integers to pointers) have occurred.

Share This Post:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

• Allocated memory that is no longer needed should be deallocated.
• In other languages, deallocation is the programmer’s responsibility.
• The Java programming language provides a system-level thread to track memory allocation.
• Garbage collection has the following characteristics:
   – Checks for and frees memory no longer needed
   – Is done automatically
   – Can vary dramatically across JVM implementations

JVM Tasks

• The JVM performs three main tasks:
   – Loads code
   – Verifies code
   – Executes code

Share This Post:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

The Java Virtual Machine

Mar-13-2010 By Nanya

• Provides hardware platform specifications
• Reads compiled byte codes that are platform-independent
• Is implemented as software or hardware
• Is implemented in a Java technology development tool or a Web browser
• JVM provides definitions for the:
   – Instruction set (central processing unit [CPU])
   – Register set
   – Class file format
   – Stack
   – Garbage-collected heap
   – Memory area
• Fatal error reporting
• High-precision timing support
• The majority of type checking is done when the code is compiled.
• Implementation of the JVM approved by Sun Microsystems must be able to run any compliant class file.
• The JVM executes on multiple operating environments.

Share This Post:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

Provides an easy-to-use language by:

• Avoiding many pitfalls of other languages
• Being object-oriented
• Enabling users to create streamlined and clear code
• Provides an interpreted environment for
1.Improved speed of development
2.Code portability
• Enables users to run more than one thread of activity
• Loads classes dynamically; that is, at the time they are actually needed
• Supports changing programs dynamically during runtime by loading classes from disparate sources
• Furnishes better security
• The following features of java fulfill these goal
1.The Java Virtual Machine (JVM™)1
2.Garbage collection
3.The Java Runtime Environment (JRE)
4.JVM tool interface

Share This Post:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

What Is the Java Technology?

Java technology is:

– A programming language
– A development environment
– An application environment
– A deployment environment

Java Technology is similar in syntax to C++.

• It is used for developing both applets and applications.

Key features of Java

• Object-oriented
• Distributed
• Simple
• Multithreaded
• Secure
• Platform-independent

Share This Post:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

History of JAVA

Mar-13-2010 By Nanya

Here are the key aspects of History of Java -

• Jan 96 -Java Development Kit 1.0 (JDK 1.0).

• Dec 98 -Java 2 Platform with version 1.2 of the Software Development Kit (SDK 1.2).

• Aug 99 -Java 2 Platform, Standard Edition (J2SE).

• Dec 99 -Java 2 Platform, Enterprise Edition (J2EE).

• May 2000 -J2SE with version 1.3 of the SDK.

• Today - J2SE with version 1.5 of the SDK.

package examples.filters;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

/**
* @version 1.0
* @author
*/

public class HelloWorldFilter implements Filter
Read the rest of this entry »

Share This Post:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • MySpace
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter