Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips
Tip Bank > Java > Java APIs

Java APIs - Page 4

Enterprise JavaBeans
61-80 of 441     Previous     Next
Sending a Cookie to a Server Through a HttpURLConnection
by Sandeep Gain
The java.net.HttpURLConnection class provides HTTP specific functionality. First you need to open an ...
Execute Another Program in a Separate Process Space
by Sandeep Gain
Use the java.lang.Runtime run a program in a separate process.
How to Choose the Right Data Structure
by Shantanu Garg
Following are some tips for matching the most commonly used data structures with particular needs.
How to Read NT System Properties
by Sandeep Gain
A direct method or class that will allow you to read NT system properties does not exist. However, it can be done as follows: ...
Determine if an Error Has Occured During Object Construction
by Sandeep Gain
This can be achieved in java by throwing an exception from your Constructor. Since Constructors cannot return a value, this is the only way you can achieve error handling.
How to Use Maps Effectively
by Shantanu Garg
The java.util.Map interface is the root interface of the map hierarchy. Interestingly, it doesn't extend the familiar java.util.Collection interface. It facilitates storage, retrieval, and ...
Customizing an Editable JComboBox
by Roy Lachapelle
A previous tip explained how to change the appearance of the 'list selection' cells of a JComboBox by setting the attributes of the JComboBox object's ListCellRenderer.
Add Testing Code to a Class With Static Inner Classes
by Shantanu Garg
Static inner classes are pretty simple in concept and implementation.
Object.hashCode() and Object.equals()
by Chakravarthy Inampudi
The Object.hashCode() method returns a number that is effectively random. This number is also implementation- and instance-dependent. This has a couple consequences: ...
Allocating Memory Before Calling a Function
by Shantanu Garg
Suppose you want to pass an object to a method and also want to allocate the object into that method. If you pass the object as it is, it will not work because the memory that the object points ...
Conditional Compilation in Java
by Sudip Bhattacharya
The C preprocessor provides for conditional compilation in instances where large areas of text are ignored and stripped out, regardless of whether a given preprocessor constant was defined. For ...
Initializing Fields in Interfaces
by Navneet Gupta
Fields defined in interfaces are automatically public, static, and final. ...
Determine Whether a User Session Has Expired or Been Removed
by Narasimhan Chakravarthy
Define a class, say SessionTimeoutIndicator, which implements ...
How to Read the Current Date and Time in a Java Application
by Sergejs Svitnevs
Misuse of System.exit
by Chakravarthy Inampudi
The System.exit method forces termination of all threads in the Java virtual machine. This can be drastic. It might, for example, destroy all windows created by the interpreter without giving the ...
How to Prevent a Class From Serialization
by Rajesh KS
The following code prevents classes from ...
Customizing JFileChooser
by M.V. Prem
The class JFileChooser inside javax.swing.* can be customized to display your own labels using the UIManager.put() method. It is a static method that takes an Object key (Original value) and an ...
Execute an External Program Without Using JNI
by Tanzim Husain
The secret lies in the Runtime class. Runtime contains the ...
Using Addbatch and Executebatch
by Tri Do
If you insert/update/delete multiple times to the database, you ...
Fast Execution of SQL Statements
by Nitin Kumar
Let's start with a code ...
61-80 of 441     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date