Menu
Question Index
...

Write a program to delete character at stringbuffer by using given index.

Input (StringBuffer, Integer) Output (String)
'UmaMaheswari', 8 'UmaMahesari'
'NagaLakshmi', 2 'NaaLakshmi'
'SwathiPriya', 6 'Swathiriya'



class DeleteCharacterAtStringBuffer
{
    public static void main(String s[])
    {
        StringBuffer stringBuffer = new StringBuffer("UmaMaheswari");
        int index = 8;
        System.out.println("After deleting character at StringBuffer object is : " + getResultantString(stringBuffer, index));

    }


    public static String getResultantString(StringBuffer input, int index) {
    }

}

Doubts

Problems

Topic: Java delete() and deleteCharAt() Methods In StringBuffer

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App