MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

/*
 * Output:
    
   his 
      
 * */

public class MainClass {
    public static void main(String args[]) {
        String s = "This is an demo.";
        int start = 1;
        int end = 5;
        char buf[] = new char[end - start];
        s.getChars(start, end, buf, 0);
        System.out.println(buf);
    }
}