Answers for "best way to substring in java to specific length"

9

how to substring in java

class scratch{
    public static void main(String[] args) {
        String hey = "Hello World";
        System.out.println( hey.substring(0, 5) );
        // prints Hello;
    }
}
Posted by: Guest on January-08-2020

Code answers related to "best way to substring in java to specific length"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language