Archive for the ‘Java’ Category
Java Object Serialization by using Java I/O Streams
Monday, August 4, 2008 12:12 No CommentsThe task is to store different objects of classes in a physically located file on hard disk. For this to store objects and their states (including the values of their data members) we have to make those classes serializeable. Use Standard Java I/O streams FileOutputStream, ObjectOutputStream to write/store to file and FileInputStream, ObjectInputStream streams to [...]
Understanding Exceptions in Java
Monday, June 30, 2008 12:23 No CommentsAn exception is an error that happens when an application is running. When an exception condition happens, the exception is said to be thrown, and it changes the normal execution control flow of the program. Java offers a very comprehensive and flexible system for exception handling. The main benefit of such a system is that [...]
Composition and Aggregation using Java
Sunday, June 29, 2008 1:22 8 CommentsThere is always been confusion about composition and aggregation. While in servicing NetSol Technologies, I came to learn practically what is composition and aggregation. First thing is both are type of association. Below is the exact definition of each term and then practical Java code, where you can understand exactly how can we implement composition [...]
How to Take Screenshots in Java
Wednesday, April 30, 2008 23:44 No CommentsHave you ever wanted to grab a screenshot from your Java application? Here’s a quick tutorial on how to grab a screenshot and save it to a JPEG and PNG file. This shows how to use the Robot class to capture the screen image and the ImageIO API to save it as a JPG and [...]
Java Buzzwords
Sunday, April 20, 2008 10:02 1 CommentYou will hear and see quite a few Java buzzwords in the Java world. It’s important to know the Java buzzwords because they represent the factors that have played important roles in shaping the Java language. These words are summarized in Table 1-3.
Buzzword
Description
Architecture neutral
The Java compiler compiles the source code into bytecode, [...]
The Memory Usage by a Java Program
Sunday, April 20, 2008 9:56 No CommentsThe instructions of a running program and the related data are temporarily stored in the computer memory. Java has good news for you here: you don’t need to worry about memory management because the JVM and garbage collector will take care of it. However, you can help by being aware of where different things are [...]
The instanceof Operator in Java
Sunday, April 20, 2008 9:51 No CommentsThe instanceof operator determines if a given object is of the type of a specific class. To be more specific, the instanceof operator tests whether its first operand is an instance of its second operand. The test is made at runtime. The first operand is supposed to be the name of an object or an [...]
Basic Components of Struts
Sunday, March 23, 2008 13:45 2 CommentsThis article describes the basic components of Struts and it is the continuation of the Introduction To Struts. libraries for working with view technologies other than JSP, and so on.
The Struts framework is a rich collection of Java libraries and can be broken down into the following major pieces:
Base framework
JSP tag libraries
Tiles plugin
Validator plugin
A [...]
What is Model-View-Controller (MVC) Architecture?
Sunday, March 23, 2008 9:29 3 CommentsModel-View-Controller is mini architecture and design pattern used for dividing application components into three different categories Model, View and the Controller. Components of the MVC architecture have unique responsibility and each component is independent of the other component. Changes in one component will have no or less impact on other component. Responsibilities of the components [...]
Java: Connecting to SQL Server 2000 using JDBC
Saturday, March 1, 2008 9:34 2 Comments Overview
Cross-platform Java Database Connectivity JDBC implementations are commonly used to connect Java programs to any of the major databases available on the market today. There are several possibilities [...]
