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 446     Previous     Next
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 ...
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 ...
61-80 of 446     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date