Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static void setObjValue(String methodName, Object object, String value) {
        try {
            Class<? extends Object> cls = object.getClass();
            cls.getMethod(methodName, String.class).invoke(object, value);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}