September 28, 2000

How to See If Data is Numeric or Non-numeric

In JavaScript you can use isNaN to check if the given data is numeric ornon-numeric.Syntax : isNaN(testdata)ReturnValue :True if the testdata is non-numeric.False if the testdata is numeric.Here’s an example:

Methods of Class Instantiation

The following methods can be used for creating new instance of your classes, depending on your specific needs. import java.lang.ClassLoader;import;import;public class InstantiateClass { testFinally newInstance() throws Exception { Second: Using the ClassLoader ClassLoader loader = this.getClass().getClassLoader(); Class c = loader.loadClass(“testFinally”); return (testFinally) c.newInstance(); } testFinally newInstance0() throws Exception

Using Verbose to Debug

Using the -verbose option during compilation and execution is very helpful&#151both for obtaining more information about the classes being loaded by the compiler and the interpreter and to find out the point of failures in your code. This feature is most useful when you have multiple classes with the same

A Problem in Using Enumeration

Once you are finished iterating through the values of an Object implementing the Enumeration interface, the next time youtry to use hasMoreElements() it will return false. Many developers are not aware of this, which leads to blind usage of Enumeration, leading to errors in the code and sometimes in the

How to Rethrow an Exception in Your Code

Use the fillInStackTrace() method to rethrow a Throwable type of exceptional condition in your code. This is useful if you want to rethrow a exception occurred while using a method or creating a Object but want to avoid the stack trace from these calls. The intention is to show the