Write code to cut a string by length
//package com.book2s; public class Main { public static void main(String[] argv) { String s = "book2s.com"; int n = 4; System.out.println(drop(s, n)); }//from w ww . jav a 2 s.c om public static String drop(String s, int n) { if (n <= 0) return s; else if (n < s.length()) return s.substring(n); else return ""; } }