Java examples for java.lang:StringBuilder
StringBuilder to Upper Case
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { StringBuilder builder = new StringBuilder(); toUpperCase(builder);// ww w . j a v a 2 s . c o m } public static void toUpperCase(StringBuilder builder) { for (int i = 0; i < builder.length(); i++) { if (Character.isLowerCase(builder.charAt(i))) { builder.setCharAt(i, Character.toUpperCase(builder.charAt(i))); } } } }