Tip Bank

DevX - Software Development Resource

Incorrect IP Lookup

Question: I have an application which uses dialup networking. If I connectafter starting my application, InetAddress.getLocalHost() alwaysreturns 127.0.0.1. Even if I connect before starting up,then disconnect and reconnect, the IP

DevX - Software Development Resource

Object Finalization

Question: How can I finalize an object without waiting for the garbage collector? Answer: The System class contains a convenience method called gc() that canbe used to ask the JVM

DevX - Software Development Resource

The Month of Calendar Class

For some reason unknown to me, the designers of java.util.Calendar class have enumerated months of the year from 0 to 11 inclusive. So, January would be month zero, and December

DevX - Software Development Resource

Using Applet Viewer the Easy way

To test your applets using the applet viewer, put the following comment in your Java file: /* */ Then you won’t need an HTML file for your applet code. The

DevX - Software Development Resource

Share Script Functions

In ASP pages, you can share script functions or libraries using the #INCLUDEdirective. This feature allows you to share subroutines and functions acrossmultiple pages. Instead of repeating similar (or rather