 |
Introduction
JavaServer Faces solves many of the historical problems of Java Web development by providing a clean implementation of the Model-View-Controller design pattern while providing a productive, component-centric development without sacrificing development power and flexibility....
By Sanskruti
|
0 4,020 |
 |
Introduction
Java environment has been built around the multithreading model. In fact all Java class libraries have been designed keeping multithreading in mind. If a thread goes off to sleep for some time, the rest of the program does not get affected by this. Similarly, an animation loop can...
By Sanskruti
|
0 16,266 |
 |
The exception handling mechanism is a cleaner way to impose check upon the conditions which may lead to errors. But you should not be carried away by it and start using exception handling anywhere and everywhere you want. Exceptions must be carefully planned and implemented. The following cases...
By Sanskruti
|
0 3,487 |
 |
Java defines several built-in classes for exception handling. All these classes are a part of the java.lang package which is automatically imported. That is why, while throwing an exception you did not specifically include any package for exception classes.
Apart from the built-in exception...
By Sanskruti
|
0 20,416 |
 |
Just like the multiple catch blocks, we can also have multiple try blocks. These try blocks may be written independently or we can nest the try blocks within each other, i.e., keep one try-catch block within another try-block. The program structure for nested try statement is:
try
{
//...
By Sanskruti
|
0 12,580 |
 |
Introduction
The code bound by the try block need not always throw a single exception. If in a try block multiple and varied exceptions are thrown, then you can place multiple catch blocks for the same try block in order to handle all those exceptions. When an exception is thrown it traverses...
By Sanskruti
|
0 21,548 |
 |
The finally clause is written with the try-catch statement. It is guarenteed to be executed after a catch block or before the method quits.
try
{
// statements
}
catch (<exception> obj)
{
// statements
}
By Sanskruti
|
0 2,384 |
 |
You have seen that an exception is thrown either implicitly in the try block and there is a catch block ready to handle it. But, there are methods, which throw the exception, but do not catch it within the method body. In this case the method which is throwing the exception must use a throws clause...
By Sanskruti
|
0 14,074 |
 |
Before you can catch an exception, some code somewhere must throw one. Any code can throw an exception: your code, code from a package written by someone else such as the packages that come with the Java platform, or the Java runtime environment. Regardless of what throws the exception, it's always...
By Sanskruti
|
0 24,895 |
 |
Introduction
The code which is expected to generate the exception must be enclosed in the try and catch block. The very basic form of the exception-handling block is as following:
try
{
//code which is expected to generate the exception
}
catch (<ExceptionTypeClass> object)
{...
By Sanskruti
|
0 7,566 |
 |
Exception is an abnormal condition that arises in the program during execution. When such a condition arises in the program, an appropriate code is written so that it can be handled. It is very much similar to the error codes returned by a subroutine in the C language. Whatever value the function...
By Sanskruti
|
0 3,087 |
 |
JNode, a "Java New OS Design Effort" is an open source all java operating system. It is a modern OS with support for modern hardware devices intended to be simple to use, install & maintain on personal devices such as desktops, tablet pcs and handhelds.
JNode has started out many years ago as...
By Tango Issac Debian
Last Message By shabbir
|
7 3,599 |
 |
Earlier in client- server computing, each application had its own client program and it worked as a user interface and need to be installed on each user's personal computer. In web applications we mostly use HTML/XHTML which is mostly supported by all the browsers and web page is displayed to the...
By Sanskruti
|
0 3,186 |
 |
The JavaMail API (http://java.sun.com/products/javamail/) is a messaging framework intended to build platform-independent applications that use e-mail messaging. It is included in the J2EE platform and is available as an optional package in J2SE. The API's main purpose is not for transporting,...
By Mary
|
0 29,372 |
 |
The classical input/output (I/O) library in Java contains classes that support I/O handling of streams with compressed data. You can easily compress and decompress any text or binary data to or from any I/O stream using either a file or any other stream (e.g., a servlet output stream). In this...
By Mary
|
0 4,940 |
 |
Introduction
Buffers can be very useful in Java since they speed up I/O operations considerably. Basically a buffer is a space allocated in memory for Bytes, Chars, and other data types to be stored. Buffers are really useful while writing Client/ Server applications.
Creating a Buffer
A...
By decodec
Last Message By pradeep
|
4 21,382 |
 |
Introduction
Assertion facility is added in J2SE 1.4. In order to support this facility J2SE 1.4 added the keyword assert to the language, and AssertionError class. An assertion checks a boolean-typed expression that must be true during program runtime execution. The assertion facility can be...
By S k
Last Message By Balaji
|
4 17,077 |
 |
How do I instantiate a bean whose constructor accepts parameters using the useBean tag?
Replacing Characters in a String?
Searching a String?
Connecting to a Database and Strings Handling?
What is a transient variable?
By sunina
Last Message By shabbir
|
1 19,511 |
 |
When many items of data of the same class or type have to be stored, it is more efficient to use an array than separate variables or objects.
For example, if the temperature on each day of the (non-leap) year had to be stored, rather than set up tempjan1, tempjan2... tempdec31 (365 variables)...
By pradeep
Last Message By macknonalds
|
2 13,616 |
 |
Growing an Array in Java
Suppose you have an array of some type that is full, and you want to grow it.
Employee a = new Employee;
// array is full
int newLength = a.length * 11 / 10 + 10;
Employee newArray = new Employee;
System.arraycopy(a, 0, newArray, 0, a.length);
a = newArray;That...
By S k
Last Message By macknonalds
|
5 18,896 |