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.


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

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


prefix : Sequence of character


true or false

Java String startsWith() method example

Flash soon

Copyright 2017 Design& Development