Menu
Question Index
...

Write a program to append the string to string buffer and trim it then print.

Input (StringBuffer, String) Output (Printed Statement)
'Hello ', 'MeritCampus' 'Hello MeritCampus'
'Online', 'School' 'OnlineSchool'
' JAVA', 'School' ' JAVASchool'
'This is ', 'a class' 'This is a class'
'String ', 'Buffer' 'String Buffer'



class TrimToSizeInStringBuffer
{
    public static void main(String s[])
    {
        printStudentDetails(new StringBuffer("Hello "), "MeritCampus");

    }


    public static void printStudentDetails(StringBuffer stringBuffer, String subString) {
    }

}

Doubts

Problems

Topic: Additional StringBuffer Methods In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App