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

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Search the Tips
Tip Bank > Java > Java APIs

Java APIs - Page 4

Enterprise JavaBeans
61-80 of 448     Previous     Next
Executing UNIX Shell Scripts From a Java Application
by Nitin Garg
To execute a UNIX shell script, first the shell needs to be executed. This can be done using an object of java runtime class.
How to Access Cookies Set at the Client Side
by Nitin Garg
Class javax.servlet.http.cookies can be used to access cookies on the client side. The following code demonstrates this technique. The code also checks for the cookie names in order to access the ...
Converting Strings Into Integers and Vice Versa
by Quan Tran
1) To convert a string into an ...
Another Way To Compare Strings
by Quan Tran
When comparing a string, you can use ...
Shortcut for System.out.println()
by Patrick Phillips
Tired of typing
Preparing a Log File With the Least File Operations
by Ravi Kant
In a big project involving several classes, logging error messages can be required. There are several ways to do this, but a simple approach is to open the log file in append mode, add the ...
Using the instanceof Keyword in Java
by Sandeep Gain
When you are typecasting and using instanceof keyword in Java, there are several things you should keep in mind. Consider the following example ...
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 ...
61-80 of 448     Previous     Next
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date