public static boolean isClassAvailable(String className){
  boolean result=false;
  try {
    Class.forName(className);
    result=true;
  }
 catch (  ClassNotFoundException ex) {
  }
  return result;
}

public static boolean isClassAvailable ( String className ) { boolean result = false ; try { Class . forName ( className ) ; result = true ; } catch ( ClassNotFoundException ex ) { } return result ; }
returns whether or not the specified class is available to the current class loader . this is used to protect the code against using java se apis on java me .
