Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {

    public static String fieldToParams(String fieldName) {

        for (char a : fieldName.toCharArray()) {
            if (a >= 65 && a <= 90) {
                fieldName = fieldName.replaceFirst(String.valueOf(a), "_" + a);
            }
        }
        fieldName = fieldName.toUpperCase();
        return fieldName;
    }
}