String startsWith(String prefix, int toffset) method in Java

String startsWith(String prefix, int toffset) method in Java

The startsWith(String prefix, int toffset) method in Java tests if this string starts with the specified prefix beginning a specified index.

Syntax

Let us see the syntax,

Parameters

Let us see the parameters,

  • prefix− the prefix
  • toffset− where to begin looking in the string

Example

The following is an example of boolean startsWith (String prefix, int toffset),

Output

The following is the output,

Java string startswith method offset

String startsWith(String prefix) method in Java
String subSequence(int beginIndex, int endIndex) method in Java
Studyopedia Editorial Staff
Studyopedia Editorial Staff
[email protected]

We work to create free tutorials for all.

No Comments

Post A Comment