Java String startsWith


The java string startsWith() method checks if this string starts with given prefix. It returns true if this string starts with given prefix else returns false.


Signature

The syntax or signature of startWith() method is given below.

public boolean startsWith(String prefix)
public boolean startsWith(String prefix, int offset)



Parameters

prefix : Sequence of character


Returns

true or false


Java String startsWith() method example

Flash soon



Copyright 2017 Design& Development