http://feeds.feedburner.com/SpendYourTimeHere-Once

Current Affiares

Monday, August 13, 2012

How to convert the string to UPPER case letter in java

How to convert  the string to UPPER case letter in java?

// in java file

public static String convertStringToUpperCase(String str) {
        String strValue = "";
        if (str == null) {
            strValue = "NA";
        } else {
            strValue = str.trim().toUpperCase();
        }
        return strValue;
    }

// in set & get java file
private String brcode;

public String getBrcode() {
        return brcode;
    }

    public void setBrcode(String brcode) {
        this.brcode = javafile.convertStringToUpperCase(brcode);
    }



No comments:

Post a Comment

My Blog List

Popular Posts

All Rights Reserved To SYTHONCE. Ethereal theme. Powered by Blogger.