Java Programming Tutorials

Java Programming Tutorials And Articles
  Title / Author Replies
Views
Introduction JDBC is a platform-independent interface between relational databases and Java. In today's Java world, JDBC is a standard application programming interface (API) for accessing enterprise data in relational databases (such as Oracle, MySQL, Sybase, and DB2) using Structured Query...
5
8,801
Java is an object-oriented language and as said everything in java is an object. But what about the primitives? They are sort of left out in the world of objects, that is, they cannot participate in the object activities, such as being returned from a method as an object, and being added to a...
13
121,181
We can create a thread in Java by extending Thread Class. A better way to create a thread in Java is to implement Runnable interface. A thread can be created by extending Java Thread class also. Now the question arises why implementing Runnable interface is a better approach? Answer is, if the...
4
163,514
Java's networking classes enable you to implement applications that communicate across a network/remote connection, but the platform also extends into the realm of the Internet and URLs. Java's URL class makes accessing Web resources as easy as accessing a local file. Let's take a look at how you...
13
65,134
Introduction Java can be used to create two types of programs: applications and applets. An application is a program that runs on a computer, under the operating system of that Computer just like the one created using C or C++. An applet is an application that is accessed on the...
7
8,450
Introduction A package is a namespace that organizes a set of related classes and interfaces to provide access protection and namespace management.You can think of packages as being similar to different folders on your computer. Software written in the Java programming language can be...
9
11,381
1. How can you store a copy of an object at the same time other threads may be changing the object's properties? Choice 1 Override writeObject() in ObjectOutputStream to make it synchronized. Choice 2 Clone the object in a block synchronized on the object and serialize the clone. Choice 3...
23
147,276
In the first part I discussed about applet fundamentals as to what is an applet, its features, various methods of Applet class and a simple example on applet. In this article I will discuss further on advanced features of applet. Applet class Applet class provides all necessary support for...
2
7,695
I often hear people asking on how to put an image on Java applications, thus here is an example of a painted panel that has an image in the same directory as the application *note* you cant use windows bmp with Java, but once you start creating your own images it's a good time to note that their...
14
29,254
The String class is used to manipulate character strings that cannot be changed. In simple terms, objects of type String are read only and immutable. The StringBuffer class is used to represent characters that can be modified. The significant performance difference between these two classes is that...
6
7,089
This article demonstrates how to write a simple Stateful Session Bean. It consists of three POJO's: Remote interface Cart.java, Bean class CartBean.java and EJB client CartClient.java. Prerequisites In order to complete the example application, you should be familiar with the following: *...
7
73,884
Here, these two codes are used to shows the difference between normal MultiThreading and Synchronized Multithreading. Notice, see the difference in the starting and finishing of all the threads in both the code and try to find why every time when you run the program code, random thread starts...
3
6,807
Introduction As we already know the primitive data type char represents a character. A chain of characters is called a string. The capability to handle strings is an important feature of any programming language. In Java, each character in a string is a 16-bit Unicode character.Because Unicode...
2
5,391
This article continues our exploration of the Abstract Window Toolkit (AWT). It examines the standard controls defined by Java. Controls are components that allow a user to interact with your application in various ways—for example; a commonly used control is the push button. The AWT supports...
8
12,245
Layout Managers In the previous article I discussed about the various Controls in Java like Button, Checkbox, Lists, Scrollbars, Text Fields, and Text Area etc. All of these components have been positioned by the default layout manager. A layout manager automatically arranges the controls within...
1
10,885
In this article I will discuss about window and some advanced components which can be added to our window such as Menu Bars and Menus. Window Fundamentals The AWT defines windows according to a class hierarchy that adds functionality and specificity with each level. The two most common...
2
5,856
Introduction The instances of the String class represent a string that cannot be modified. If we do want to create modifiable strings because we are going to do lots of string manipulation, we should use the java.lang.StringBuffer and java.lang.StringBuilder classes.If we choose to do a lot of...
2
7,301
Introduction Applets are event-driven programs. Event handling is at the core of successful applet programming. Most events to which an applet will respond are generated by the user. There are several types of events. The most commonly handled events are those generated by the mouse, the...
2
7,914
Introduction In the last article on servlet, we noted that HTTP is the protocol most-commonly used to communicate with web applications. Unfortunately, HTTP offers no mechanism for data to be retained between requests; in other words it can't track the activities of a user across requests. ...
1
7,517
In the previous article we discussed three examples, each of which demonstrates how to track user sessions programmatically, using URL rewriting, cookies, and hidden form fields respectively. Each of these techniques required some unique string to be exchanged between the client and the server, so...
3
20,391