« Back
package com.string; public class StringStartsWith { public static void main(String[] args) { String str = "Hello Codersarts"; System.out.println(str.startsWith("H")); System.out.println(str.startsWith("e")); System.out.println(str.startsWith("H",0)); System.out.println(str.startsWith("e",0)); } }
true
false
true
false
×
Report a Problem:
Description:
Submit