STRINGS

14. Program to count the total number of characters in a string

            class Main{
                public static void main(String[] args){
                    String str = "Hello World";
                    System.out.println("Number of Character in " + str + " : " + str.length());
                }
            }
        

OUTPUT

            Number of Character in Hello World : 11