Java test if string starts with a substring

https:/‮ww/‬w.lautturi.com
Java test if string starts with a substring
/**
 * @author lautturi.com 
 * Java example: Java String startsWith /
 determine whether a string start with another string in java
 */

import java.util.*;

public class Lautturi {
	public static void main(String[] args) {
		String str = "welcome to lauttur! java world!";
		System.out.println(str.startsWith("welcome"));
		System.out.println(str.startsWith(" welcome"));
	}
}

output:

true
false
Created Time:2017-10-09 23:11:44  Author:lautturi