Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * From the name of the class returns the class.
     * 
     * @param data
     *            The name for class
     * @return the class or null
     */
    public static Class<?> returnClass(final String data) {
        Class<?> clazz = null;
        try {
            clazz = Class.forName(data);
        } catch (final ClassNotFoundException e) {
            e.printStackTrace();
        }
        return clazz;
    }
}