Answers for "java string contains at beginning"

4

java string contains at beginning

public class StringExample 
{
    public static void main(String[] args) 
    {
        String blogName = "howtodoinjava.com";
         
        System.out.println( blogName.startsWith("how") );               //true
         
        System.out.println( "howtodoinjava.com".startsWith("howto") );  //true
         
        System.out.println( "howtodoinjava.com".startsWith("hello") );  //false
    }
}
Posted by: Guest on May-13-2020

Code answers related to "java string contains at beginning"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language