Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {

        String str = "www.java2s.com";
        System.out.println(str);

        String startstr1 = "www";
        String startstr2 = "http://";

        boolean retval1 = str.startsWith(startstr1);
        boolean retval2 = str.startsWith(startstr2);

        System.out.println(retval1);
        System.out.println(retval2);
    }
}