Menu
Question Index
...

Write a program to delete the character at give index of given StringBuffer object.

Input (String, int) Output (String)
'HelloWorld', 5 'Helloorld'
'JavaSchool', 4 'Javachool'
'Technology', 1 'Tchnology'
'NewsPaper', 2 'NesPaper'



class DeleteCharacterInStringBuffer
{
    public static void main(String s[])
    {
        StringBuffer stringBuffer = new StringBuffer("HelloWorld");
        System.out.println("After Deleting: " + getRemainingString(stringBuffer, 5));

    }


    public static String getRemainingString(StringBuffer stringBuffer, 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