You are here: Home / Topics / stringBuffer deleteCharAt() method in Java

stringBuffer deleteCharAt() method in Java

Filed under: Java on 2023-09-17 06:51:38

// Program to explain the following StringBuffer function :
// StringBuffer deleteCharAt( int loc )

class  MdeleteCharAt
{
public static void main( String args[ ] )
{
 StringBuffer sb = new StringBuffer( "Java Programming Examples." );

 System.out.println( " String = " + sb );
 
 sb = sb.deleteCharAt( 5 );

 System.out.println( " String = " + sb );
}
}


Output:

String = Java Programming Examples.
String = Java rogramming Examples.


About Author:
M
Mr. Dubey     View Profile
Founder of MCQ Buddy. I just like to help others. This portal helps students in getting study material free. Share your stuff here so that others can get benefitted.