Fjangkrik

mail@pastecode.io avatar
unknown
java
a month ago
549 B
4
Indexable
Never
public class Main {
    public static void main(String[] args) {
        String arr = "Sistem Informasi";
        char[] arrchar = arr.toCharArray();
        arrchar[0] = Character.toLowerCase(arrchar[0]);
        char temp = arrchar[arrchar.length-1];
        temp = Character.toUpperCase(temp);
        char[] newarr = new char[arrchar.length];
        newarr[0] = temp;
        for(int i = 0;i<arrchar.length-1;i++){
            newarr[i+1] = arrchar[i];
        }

        for(char i : newarr){
            System.out.print(i);
        }
    }
}
Leave a Comment