Java - Strings Class-String subSequence() Method - Java

Description

This method returns a new character sequence that is a subsequence of this sequence.

Syntax

Here is the syntax of this method −

Parameters

Here is the detail of parameters −

  • beginIndex − the begin index, inclusive.
  • endIndex − the end index, exclusive.

Return Value

This method returns the specified subsequence.

Example

This will produce the following result −

Output

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Java Topics