/** * @author lautturi.com * Java example: Java convert the characters in a string to uppercase */ import java.util.*; public class Lautturi { public static void main(String args[]) { String str = "welcome to lauttur! java world!"; System.out.println(str); str = str.toUpperCase(); System.out.println(str); str = str.substring(5,6).toUpperCase(); System.out.println(str); } }Suorce:www.lautturi.com
output:
welcome to lauttur! java world! WELCOME TO LAUTTUR! JAVA WORLD! M