June 2018
Beginner
722 pages
18h 47m
English
The following methods return true when the String value starts (or ends) with the provided substring prefix:
Here is the demo code:
boolean b = "Introduction".startsWith("Intro");System.out.println(b); //prints: trueb = "Introduction".startsWith("tro", 2);System.out.println(b); //prints: trueb = "Introduction".endsWith("ion");System.out.println(b); //prints: true
Read now
Unlock full access