Monday, March 28, 2011
Object Ordering
Trail: Collections
Get started with the Java Collections
Java Collection Framework
Java Collections Tutorial
Sunday, March 6, 2011
What Is an Object?
Real-world objects share two characteristics: They all have state and behavior. Dogs have state (name, color, breed, hungry) and behavior (barking, fetching, wagging tail). Bicycles also have state (current gear, current pedal cadence, current speed) and behavior (changing gear, changing pedal cadence, applying brakes). Identifying the state and behavior for real-world objects is a great way to begin thinking in terms of object-oriented programming.
Take a minute right now to observe the real-world objects that are in your immediate area. For each object that you see, ask yourself two questions: "What possible states can this object be in?" and "What possible behavior can this object perform?". Make sure to write down your observations. As you do, you'll notice that real-world objects vary in complexity; your desktop lamp may have only two possible states (on and off) and two possible behaviors (turn on, turn off), but your desktop radio might have additional states (on, off, current volume, current station) and behavior (turn on, turn off, increase volume, decrease volume, seek, scan, and tune). You may also notice that some objects, in turn, will also contain other objects. These real-world observations all translate into the world of object-oriented programming.
A software object.
Software objects are conceptually similar to real-world objects: they too consist of state and related behavior. An object stores its state in fields (variables in some programming languages) and exposes its behavior through methods (functions in some programming languages). Methods operate on an object's internal state and serve as the primary mechanism for object-to-object communication. Hiding internal state and requiring all interaction to be performed through an object's methods is known as data encapsulation — a fundamental principle of object-oriented programming.
Consider a bicycle, for example:
A bicycle modeled as a software object.
Bundling code into individual software objects provides a number of benefits, including:
- Modularity: The source code for an object can be written and maintained independently of the source code for other objects. Once created, an object can be easily passed around inside the system.
- Information-hiding: By interacting only with an object's methods, the details of its internal implementation remain hidden from the outside world.
- Code re-use: If an object already exists (perhaps written by another software developer), you can use that object in your program. This allows specialists to implement/test/debug complex, task-specific objects, which you can then trust to run in your own code.
- Pluggability and debugging ease: If a particular object turns out to be problematic, you can simply remove it from your application and plug in a different object as its replacement. This is analogous to fixing mechanical problems in the real world. If a bolt breaks, you replace it, not the entire machine.
Object-Oriented Programming Concepts
What Is an Object?
An object is a software bundle of related state and behavior. Software objects are often used to model the real-world objects that you find in everyday life. This lesson explains how state and behavior are represented within an object, introduces the concept of data encapsulation, and explains the benefits of designing your software in this manner.
What Is a Class?
A class is a blueprint or prototype from which objects are created. This section defines a class that models the state and behavior of a real-world object. It intentionally focuses on the basics, showing how even a simple class can cleanly model state and behavior.
What Is Inheritance?
Inheritance provides a powerful and natural mechanism for organizing and structuring your software. This section explains how classes inherit state and behavior from their superclasses, and explains how to derive one class from another using the simple syntax provided by the Java programming language.
What Is an Interface?
An interface is a contract between a class and the outside world. When a class implements an interface, it promises to provide the behavior published by that interface. This section defines a simple interface and explains the necessary changes for any class that implements it.
What Is a Package?
A package is a namespace for organizing classes and interfaces in a logical manner. Placing your code into packages makes large software projects easier to manage. This section explains why this is useful, and introduces you to the Application Programming Interface (API) provided by the Java platform.
Questions and Exercises: Object-Oriented Programming Concepts
Use the questions and exercises presented in this section to test your understanding of objects, classes, inheritance, interfaces, and packages.
Designing Java applications using Object Orientation
Architecture & code of HelloWorld3
Following is the class diagram of the HelloWorld3 application:
The GreetingFactory class is designed to generate a new greeting object base on input type. The HelloWorld3 class then gets a greeting interface referencing to a corresponding concrete class by using the factory class. This means it invokes methods of the interface only and does not need to know what greeting concrete classes are and how they are implemented.
With this architecture,you also can add a new different greeting class implementing IGreeting interface such as ItalianGreeting but do not need to update the HelloWorld3 again.
Followings are screenshots of class details and running results:
• Define the interface below for Greeting object,this interface has only one method
• Create two greeting classes to implement the interface above,one for French greeting,another for English greeting
• Define the factory,GreetingFactory,to produce greeting
• Create the entry point of this application,it checks input params and call GreetingFactory to produce the corresponding greeting
Run HelloWorld3
Followings are steps help you to compile and run the HelloWorld3 application:
• Go to the source code folder of HelloWorld3 and type command javac *.java to compile all source code files,as following:
• The console below show the way to run HelloWorld3 with value of input parameter passed as french to receive a French greeting:
• By passing input parameter with value different to french you will receive a English greeting as following:
What is Java? & Java Environment Setup:
Java is:
- Object Oriented
- Platform independent:
- Simple
- Secure
- Architectural- neutral
- Portable
- Robust
- Multi-threaded
- Interpreted
- High Performance
- Distributed
- Dynamic
Java Environment Setup:
Java SE is freely available from the link Download Java. So you download a version based on your operating system.
You can refere to installation guide for a complete detail.
Java Basic Syntax:
Object - Objects have states and behaviors. Example: A dog has states-color, name, breed as well as behaviors -wagging, barking, eating. An object is an instance of a class.
Class - A class can be defined as a template/ blue print that describe the behaviors/states that object of its type support.
Methods - A method is basically a behavior. A class can contain many methods. It is in methods where the logics are written, data is manipulated and all the actions are executed.
Instant Variables - Each object has its unique set of instant variables. An object.s state is created by the values assigned to these instant variables.
First Java Program:
Let us look at a simple code that would print the words Hello World.
public class MyFirstJavaProgram{ |
About Java programs, it is very important to keep in mind the following points.
Case Sensitivity - Java is case sensitive which means identifier Hello and hello would have different meaning in Java.
Class Names - For all class names the first letter should be in Upper Case.
If several words are used to form a name of the class each inner words first letter should be in Upper Case.
Example class MyFirstJavaClassMethod Names - All method names should start with a Lower Case letter.
If several words are used to form the name of the method, then each inner word's first letter should be in Upper Case.
Example public void myMethodName()Program File Name - Name of the program file should exactly match the class name.
When saving the file you should save it using the class name (Remember java is case sensitive) and append '.java' to the end of the name. (if the file name and the class name do not match your program will not compile).
Example : Assume 'MyFirstJavaProgram' is the class name. Then the file should be saved as 'MyFirstJavaProgram.java'public static void main(String args[]) - java program processing starts from the main() method which is a mandatory part of every java program..
Java Identifiers:
All java components require names. Names used for classes, variables and methods are called identifiers.
In java there are several points to remember about identifiers. They are as follows:
All identifiers should begin with a letter (A to Z or a to z ), currency character ($) or an underscore (-).
After the first character identifiers can have any combination of characters.
A key word cannot be used as an identifier.
Most importantly identifiers are case sensitive.
Examples of legal identifiers:age, $salary, _value, __1_value
Examples of illegal identifiers : 123abc, -salary
Java Modifiers:
Like other languages it is possible to modify classes, methods etc by using modifiers. There are two categories of modifiers.
Access Modifiers : defualt, public , protected, private
Non-access Modifiers : final, abstract, strictfp
We will be looking into more details about modifiers in the next section.
Java Variables:
We would see following type of variables in Java:
- Local Variables
- Class Variables (Static Variables)
- Instance Variables (Non static variables)
Java Arrays:
Arrays are objects that store multiple variables of the same type. However an Array itself is an object on the heap. We will look into how to declare, construct and initialize in the upcoming chapters.
Java Enums:
Enums were introduced in java 5.0. Enums restrict a variable to have one of only a few predefined values. The values in this enumerated list are called enums.
With the use of enums it is possible to reduce the number of bugs in your code.
For example if we consider an application for a fresh juice shop it would be possible to restrict the glass size to small, medium and Large. This would make sure that it would not allow anyone to order any size other than the small, medium or large.
Example:
class FreshJuice{ |
Note: enums can be declared as their own or inside a class. Methods, variables, constructors can be defined inside enums as well.
Java Keywords:
The following list shows the reserved words in Java. These reserved words may not be used as constant or variable or any other identifier names.
abstract | assert | boolean | break |
byte | case | catch | char |
class | const | continue | default |
do | double | else | enum |
extends | final | finally | float |
for | goto | if | implements |
import | instanceof | int | interface |
long | native | new | package |
private | protected | public | return |
short | static | strictfp | super |
switch | synchronized | this | throw |
throws | transient | try | void |
volatile | while |
|
|
Comments in Java
Java supports single line and multi-line comments very similar to c and c++. All characters available inside any comment are ignored by Java compiler.
public class MyFirstJavaProgram{ |
Data Types in Java
There are two data types available in Java:
Primitive Data Types
Reference/Object Data Types
Primitive Data Types:
There are eight primitive data types supported by Java. Primitive data types are predefined by the language and named by a key word. Let us now look into detail about the eight primitive data types.
- byte
- short
- int
- long
- float
- double
- boolean
- char
Reference Data Types:
Reference variables are created using defined constructors of the classes. They are used to access objects. These variables are declared to be of a specific type that cannot be changed. For example, Employee, Puppy etc.
Class objects, and various type of array variables come under reference data type.
Default value of any reference variable is null.
A reference variable can be used to refer to any object of the declared type or any compatible type.
Example : Animal animal = new Animal("giraffe");
Java Literals:
A literal is a source code representation of a fixed value. They are represented directly in the code without any computation.
Literals can be assigned to any primitive type variable. For example:
byte a = 68; |
String literals in Java are specified like they are in most other languages by enclosing a sequence of characters between a pair of double quotes. Examples of string literals are:
"Hello World" |
Java language supports few special escape sequences for String and char literals as well. They are:
Notation | Character represented |
---|---|
\n | Newline (0x0a) |
\r | Carriage return (0x0d) |
\f | Formfeed (0x0c) |
\b | Backspace (0x08) |
\s | Space (0x20) |
\t | tab |
\" | Double quote |
\' | Single quote |
\\ | backslash |
\ddd | Octal character (ddd) |
\uxxxx | Hexadecimal UNICODE character (xxxx) |
Java Access Modifiers:
Java provides a number of access modifiers to set access levels for classes, variables, methods and constructors. The four access levels are:
Visible to the package. the default. No modifiers are needed.
Visible to the class only (private).
Visible to the world (public).
Visible to the package and all subclasses (protected).
Java Basic Operators:
Java provides a rich set of operators to manipulate variables. We can divide all the Java operators into the following groups:
The Arithmetic Operators:
Operator | Description | Example |
---|---|---|
+ | Addition - Adds values on either side of the operator | A + B will give 30 |
- | Subtraction - Subtracts right hand operand from left hand operand | A - B will give -10 |
* | Multiplication - Multiplies values on either side of the operator | A * B will give 200 |
/ | Division - Divides left hand operand by right hand operand | B / A will give 2 |
% | Modulus - Divides left hand operand by right hand operand and returns remainder | B % A will give 0 |
++ | Increment - Increase the value of operand by 1 | B++ gives 21 |
-- | Decrement - Decrease the value of operand by 1 | B-- gives 19 |
The Relational Operators:
Operator | Description | Example |
---|---|---|
== | Checks if the value of two operands are equal or not, if yes then condition becomes true. | (A == B) is not true. |
!= | Checks if the value of two operands are equal or not, if values are not equal then condition becomes true. | (A != B) is true. |
> | Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true. | (A > B) is not true. |
< | Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true. | (A <> |
>= | Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. | (A >= B) is not true. |
<= | Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true. | (A <= B) is true. |
The Bitwise Operators:
Operator | Description | Example |
---|---|---|
& | Binary AND Operator copies a bit to the result if it exists in both operands. | (A & B) will give 12 which is 0000 1100 |
| | Binary OR Operator copies a bit if it exists in eather operand. | (A | B) will give 61 which is 0011 1101 |
^ | Binary XOR Operator copies the bit if it is set in one operand but not both. | (A ^ B) will give 49 which is 0011 0001 |
~ | Binary Ones Complement Operator is unary and has the efect of 'flipping' bits. | (~A ) will give -60 which is 1100 0011 |
<< | Binary Left Shift Operator. The left operands value is moved left by the number of bits specified by the right operand. | A <<> |
>> | Binary Right Shift Operator. The left operands value is moved right by the number of bits specified by the right operand. | A >> 2 will give 15 which is 1111 |
>>> | Shift right zero fill operator. The left operands value is moved right by the number of bits specified by the right operand and shifted values are filled up with zeros. | A >>>2 will give 15 which is 0000 1111 |
The Logical Operators:
Operator | Description | Example |
---|---|---|
&& | Called Logical AND operator. If both the operands are non zero then then condition becomes true. | (A && B) is false. |
|| | Called Logical OR Operator. If any of the two operands are non zero then then condition becomes true. | (A || B) is true. |
! | Called Logical NOT Operator. Use to reverses the logical state of its operand. If a condition is true then Logical NOT operator will make false. | !(A && B) is true. |
The Assignment Operators:
Operator | Description | Example |
---|---|---|
= | Simple assignment operator, Assigns values from right side operands to left side operand | C = A + B will assigne value of A + B into C |
+= | Add AND assignment operator, It adds right operand to the left operand and assign the result to left operand | C += A is equivalent to C = C + A |
-= | Subtract AND assignment operator, It subtracts right operand from the left operand and assign the result to left operand | C -= A is equivalent to C = C - A |
*= | Multiply AND assignment operator, It multiplies right operand with the left operand and assign the result to left operand | C *= A is equivalent to C = C * A |
/= | Divide AND assignment operator, It divides left operand with the right operand and assign the result to left operand | C /= A is equivalent to C = C / A |
%= | Modulus AND assignment operator, It takes modulus using two operands and assign the result to left operand | C %= A is equivalent to C = C % A |
<<= | Left shift AND assignment operator | C <<= 2 is same as C = C <<> |
>>= | Right shift AND assignment operator | C >>= 2 is same as C = C >> 2 |
&= | Bitwise AND assignment operator | C &= 2 is same as C = C & 2 |
^= | bitwise exclusive OR and assignment operator | C ^= 2 is same as C = C ^ 2 |
|= | bitwise inclusive OR and assignment operator | C |= 2 is same as C = C | 2 |
Misc Operators
There are few other operators supported by Java Language.
Conditional Operator ( ? : ):
Conditional operator is also known as the ternary operator. This operator consists of three operands and is used to evaluate boolean expressions. The goal of the operator is to decide which value should be assigned to the variable. The operator is written as :
variable x = (expression) ? value if true : value if false |
instanceOf Operator:
This operator is used only for object reference variables. The operator checks whether the object is of a particular type(class type or interface type). instanceOf operator is wriiten as:
( Object reference variable ) instanceOf (class/interface type) |
Precedence of Java Operators:
Category | Operator | Associativity |
---|---|---|
Postfix | () [] . (dot operator) | Left to right |
Unary | ++ - - ! ~ | Right to left |
Multiplicative | * / % | Left to right |
Additive | + - | Left to right |
Shift | >> >>> << | Left to right |
Relational | > >= < <= | Left to right |
Equality | == != | Left to right |
Bitwise AND | & | Left to right |
Bitwise XOR | ^ | Left to right |
Bitwise OR | | | Left to right |
Logical AND | && | Left to right |
Logical OR | || | Left to right |
Conditional | ?: | Right to left |
Assignment | = += -= *= /= %= >>= <<= &= ^= |= | Right to left |
Comma | , | Left to right |
What Is a Servlet?
A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed via a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by Web servers. For such applications, Java Servlet technology defines HTTP-specific servlet classes.
The javax.servlet and javax.servlet.http packages provide interfaces and classes for writing servlets. All servlets must implement the Servlet interface, which defines life-cycle methods.
When implementing a generic service, you can use or extend the GenericServlet class provided with the Java Servlet API. The HttpServlet class provides methods, such as doGet and doPost, for handling HTTP-specific services.
This chapter focuses on writing servlets that generate responses to HTTP
requests. Some knowledge of the HTTP protocol is assumed; if you are unfamiliar with this protocol, you can get a brief introduction to HTTP in Appendix A.
The Example Servlets
This chapter uses the Duke's Bookstore application to illustrate the tasks involved in programming servlets. Table 10-1 lists the servlets that handle each bookstore function. Each programming task is illustrated by one or more servlets. For example, BookDetailsServlet illustrates how to handle HTTP GET requests, BookDetailsServlet and CatalogServlet show how to construct responses, and CatalogServlet illustrates how to track session information.
Table 10-1 Duke's Bookstore Example Servlets Function
Servlet
Enter the bookstore
BookStoreServlet
Create the bookstore banner
BannerServlet
Browse the bookstore catalog
CatalogServlet
Put a book in a shopping cart
CatalogServlet,
BookDetailsServlet
Get detailed information on a specific book
BookDetailsServlet
Display the shopping cart
ShowCartServlet
Remove one or more books from the shopping cart
ShowCartServlet
Buy the books in the shopping cart
CashierServlet
Receive an acknowledgement for the purchase
ReceiptServlet
The data for the bookstore application is maintained in a database and accessed through the helper class database.BookDB. The database package also contains the class BookDetails, which represents a book. The shopping cart and shopping cart items are represented by the classes cart.ShoppingCart and cart.ShoppingCartItem, respectively.
The source code for the bookstore application is located in the j2eetutorial/examples/src/web/bookstore1 directory created when you unzip the tutorial bundle (see Downloading the Examples). To build, deploy, and run the example, follow these steps.
1. Go to j2eetutorial/examples and build the example by running ant bookstore1 (see How to Build and Run the Examples).
2. Start the j2ee server.
3. Start deploytool.
4. Start the Cloudscape database server by running cloudscape -start.
5. Load the bookstore data into the database by running ant create-web-db.
6. Create a J2EE application called Bookstore1App.
1. Select FileNewApplication.
2. In the file chooser, navigate to j2eetutorial/examples/src/web/bookstore1.
3. In the File Name field, enter Bookstore1App.
4. Click New Application.
5. Click OK.
7. Create the WAR and add the BannerServlet Web component and all of the Duke's Bookstore content to the Bookstore1App application.
1. Select FileNewWeb Component.
2. Click the Create New WAR File In Application radio button and select Bookstore1App from the combo box. Enter Bookstore1WAR in the field labeled WAR Display Name.
3. Click Edit to add the content files.
4. In the Edit Archive Contents dialog box, navigate to j2eetutorial/examples/build/web/bookstore1. Select BannerServlet.class, BookStoreServlet.class, BookDetailsServlet.class, CatalogServlet.class, ShowCartServlet.class, CashierServlet.class, and ReceiptServlet.class. Click Add. Add errorpage.html and duke.books.gif. Add the cart, database, exception, filters, listeners, messages, and util packages. Click OK.
5. Click Next.
6. Select the Servlet radio button.
7. Click Next.
8. Select BannerServlet from the Servlet Class combo box.
9. Click Next twice.
10. In the Component Aliases pane, click Add and then type /banner in the Alias field.
11. Click Finish.
8. Add each of the Web components listed in Table 10-2. For each servlet, click the Add to Existing WAR File radio button and select Bookstore1WAR from the combo box. Since the WAR contains all of the servlet classes, you do not have to add any more content.
Table 10-2 Duke's Bookstore Web Components Web Component Name
Servlet Class
Component Alias
BookStoreServlet
BookStoreServlet
/enter
CatalogServlet
CatalogServlet
/catalog
BookDetailsServlet
BookDetailsServlet
/bookdetails
ShowCartServlet
ShowCartServlet
/showcart
CashierServlet
CashierServlet
/cashier
ReceiptServlet
ReceiptServlet
/receipt
9. Add a resource reference for the Cloudscape database.
1. Select Bookstore1WAR.
2. Select the Resource Refs tab.
3. Click Add.
4. Select javax.sql.DataSource from the Type column
5. Enter jdbc/BookDB in the Coded Name field.
6. Enter jdbc/Cloudscape in the JNDI Name field.
10. Add the listener class listeners.ContextListener (described in Handling Servlet Life-Cycle Events).
1. Select the Event Listeners tab.
2. Click Add.
3. Select the listeners.ContextListener class from the drop-down field in the Event Listener Classes pane.
11. Add an error page (described in Handling Errors).
1. Select the File Refs tab.
2. In the Error Mapping panel, click Add.
3. Enter exception.BookNotFoundException in the Error/Exception field.
4. Enter /errorpage.html in the Resource To Be Called field.
5. Repeat for exception.BooksNotFoundException and javax.servlet.UnavailableException.
12. Add the filters filters.HitCounterFilter and filters.OrderFilter (described in Filtering Requests and Responses).
1. Select the Filter Mapping tab.
2. Click Edit Filter List.
3. Click Add.
4. Select filters.HitCounterFilter from the Filter Class column. The deploytool utility will automatically enter HitCounterFilter in the Display Name column.
5. Click Add.
6. Select filters.OrderFilter from the Filter Class column. The deploytool utility will automatically enter OrderFilter in the Display Name column.
7. Click OK.
8. Click Add.
9. Select HitCounterFilter from the Filter Name column.
10. Select Servlet from the Target Type column.
11. Select BookStoreServlet from the Target column.
12. Repeat for OrderFilter. The target type is Servlet and the target is ReceiptServlet.
13. Enter the context root.
1. Select Bookstore1App.
2. Select the Web Context tab.
3. Enter bookstore1.
14. Deploy the application.
1. Select ToolsDeploy.
2. Click Finish.
15. Open the bookstore URL http://
Troubleshooting
The section Common Problems and Their Solutions (in particular, Web Client Runtime Errors) lists some reasons why a Web client can fail. In addition, Duke's Bookstore returns the following exceptions:
* BookNotFoundException: Returned if a book can't be located in the bookstore database. This will occur if you haven't loaded the bookstore database with data by running ant create-web-db or if the Cloudscape server hasn't been started or it has crashed.
* BooksNotFoundException: Returned if the bookstore data can't be retrieved. This will occur if you haven't loaded the bookstore database with data by running ant create-web-db or if the Cloudscape server hasn't been started or has crashed.
* UnavailableException: Returned if a servlet can't retrieve the Web context attribute representing the bookstore. This will occur if you haven't added the listener class to the application.
Since we have specified an error page, you will see the message The application is unavailable. Please try later. If you don't specify an error page, the Web container generates a default page containing the message A Servlet Exception Has Occurred and a stack trace that can help diagnose the cause of the exception. If you use errorpage.html, you will have to look in the Web container's log to determine the cause of the exception. Web log files reside in the directory
$J2EE_HOME/logs/
and are named catalina.
The
Free Java tutorials & programming source code
Free Java Guide: This site lists General Java tutorials and specific Java programming topics for serious programming. In the case of sql tutorial, for each command, the SQL syntax will first be presented and explained, followed by an example. This site aims to teach beginners the building blocks of SQL. Well organized, easy to understand SQL guide with lots of examples that helps you need to get started using SQL. If you are also looking for a PL/SQL tutorial, this is the site. Our PL/SQL tutorial provides the help you need to get started using SQL and PL/SQL.
Master Java, find popular listings for various Java technologies ranging from Core Java, PL/SQL, HTML, XML and SQL
CORE JAVA TUTORIALS
Learn the Core Java basics. This topic is for those learning Java programming or having general Java programming questions. It is a fundamental guide, aimed at beginners to java programming.
PL/SQL
If you are looking to learn PL/SQL, this is the site. It provides the help you need to get started using SQL and PL/SQL. It gives an introduction to Procedural Structured Query Language (pl/sql). PL/SQL help, examples and references needed to start programming in plsql.
SQL
This covers the basics of SQL Language. This lists the commonly used SQL commands, and is divided into the various sections organized by sql topics. By the end of this sql guide, you should have a good general understanding of the SQL syntax. In addition, you should be able to write SQL queries using the correct syntax.
ORACLE Question Bank
It contains more than 500 Questions (in 10 pages) of oracle and SQL + PL/SQL which can be used for facing interviews and for personal evaluation of oracle knowledge organized by topic. This question bank helps by asking you questions and explaining which answer is correct and why.
HTML Tutorial for beginners HTML Tutorial - advanced
This is a terrific resource for beginners and students. It includes many copy & paste HTML scripts with detailed explanations that you can put right into an existing web page. It's also a good reference to find that tag that you just can't remember but need for your web page.
The following material is a part of 'IBM's resource for developers' website.
1. SCJP, Part 1
This SCJP guide is to help you become a Sun certified Java programmer. It is organized in the same way as the Sun Certified Java Programmer (SCJP) 1.4 exam and provides a detailed overview of all of the exam's main objectives. Throughout the java pdf, simple examples are provided to illustrate the important concepts covered in the exam.
2. Introduction to Core java I/O
This java I/O pdf is an overview of Java I/O and all the classes in the java.io package. This guide assumes you have a basic knowledge of I/O, including Input Stream and Output Stream.
3. Enterprise Beans Fundamentals
This ejb pdf provides an introduction to Enterprise JavaBeans technology with particular attention to the role of Enterprise JavaBean components in distributed computing scenarios, the architecture, the extension APIs, and the fundamentals of working with EJB technologies
4. The Class Loader
The Java ClassLoader is a crucial, but often overlooked, component of the Java runtime system. It is the class responsible for finding and loading class files at run time. Creating your own ClassLoader lets you customize the JVM in useful and interesting ways, allowing you to completely redefine how class files are brought into the system.
5. Design Patterns 101
This lesson is for Java programmers who want to learn about java design patterns as a means of improving their object oriented design and development skills. After reading this pdf you will:
* Understand what design patterns are and how they are described and categorized in several well known catalogs
* Be able to use design patterns as a vocabulary for understanding and discussing object oriented software design
* Understand a few of the most common design patterns and know when and how they should be used
4. Introduction to Threads
This tutorial explores the basics of threads -- what they are, why they are useful, and how to get started writing simple programs that use them. It also explains the basic building blocks of more sophisticated threading applications, how to exchange data between threads, how to control threads, and how threads can communicate with each other.
XML Tutorials
Introduction: Learn what XML is all about and discover how it differs from HTML. Explore XML syntax rules, learn how to write well formed XML documents, adjust XML attributes, validate XML documents and XML programming with java. In these tutorials you will learn what XML is about. You'll understand the basic XML syntax. Know what's needed to make XML usable along with java programming. You'll be able to understand XML Documents and most of XML DTD's.
6. XML programming in Java technology, Part 1
This xml tutorial covers the basics of manipulating XML documents using Java technology and looks at the common APIs for XML and discusses how to parse, create, manipulate, and transform XML documents. Covers basics of XML parsing in the Java language.
7. XML programming in Java technology, Part 2
This looks at working with namespaces, validating XML documents, building XML structures without a typical XML document, converting between one API and another, and manipulating tree structures.
8. XML programming in Java technology, Part 3
Covers more sophisticated topics for manipulating XML documents with Java technology. It shows you how to do tasks such as generate XML data structures, manipulate those structures, and interface XML parsers with non XML data sources.
8. Understanding DOM
This is designed for developers who understand the basic concept of XML and are ready to move on to coding applications to manipulate XML using the Document Object Model (DOM). It assumes that you are familiar with concepts such as well formed ness and the tag like nature of an XML document
Java Beginner Tutorial
Java has evolved to be the most predominant and popular general purpose programming language of the current age. Java is a simple, portable, distributed, robust, secure, dynamic, architecture neutral, object orientedprogramming language. It was developed by Sun Microsystems. This technology allows the software designed and developed once for an idealized ‘virtual machine’ and run on various computing platforms.
Java plays a significant role in the corporate world. Companies of all sizes are using Java as the main programming language to develop various applications/projects world wide. It has found its use in various sectors including banking, insurance, retail, media, education, manufacturing and so on. E-commerce, Gaming, Mobile, Embedded, Media and many more types of applications are being developed using Java. Organizations are developing mission critical applications using Java technologies. This necessitates the corporations to hire highly skilled java developers. On the other hand it opens the doors for many opportunities for java developers. There is significant demand for java developers with sound technical skills. Now Colleges and Universities all over the world are using it in their introduction courses as well as their junior and senior software engineering courses.
This site was developed considering the importance of this language and the benefits that it provides to corporations, developers, students, education institutions and more. Javabeginner.com is free online Java tutorial site with a huge number of java programs for java development. This site is evolving with more content, features, links and useful information. If you have any suggestions, feedback, concerns, corrections or questions please communicate through Feedback section.
SOURCE:http://www.javabeginner.com/