FileDocCategorySizeDatePackage
ComputeResult.javaAPI DocExample535Tue Dec 12 18:58:04 GMT 2000None

ComputeResult

public class ComputeResult extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        String original = "software";
        StringBuffer result = new StringBuffer("hi");
        int index = original.indexOf('a");

/*1*/   result.setCharAt(0, original.charAt(0));
/*2*/   result.setCharAt(1, original.charAt(original.length()-1));
/*3*/   result.insert(1, original.charAt(4));
/*4*/   result.append(original.substring(1,4));
/*5*/   result.insert(3, (original.substring(index, index+2) + " "));

        System.out.println(result);