IT. Expert System.

Java basics

deleteCharAt()


The java.lang.StringBuilder.deleteCharAt() method removes the char at the specified position in this sequence. This sequence is shortened by one char.

Syntax:
public StringBuilder deleteCharAt(int index)


Example:

/* java example */
import java.lang.*;

public class StringBuilderDemo {

  public static void main(String[] args) {
  
    StringBuilder str = new StringBuilder("Java lang package");
    System.out.println("string = " + str);
 
    // deleting character from index 4 to index 9
    str.delete(4, 9);
    System.out.println("After deletion = " + str);

    str = new StringBuilder("amit");
    System.out.println("string = " + str);
    // deleting character at index 2
    str.deleteCharAt(2);
    System.out.println("After deletion = " + str);
  }
}


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 459 / 158764123. Delta: 0.00157 с