word counter

Word Counter in Java

Submitted by tutgeeks on
Here is a Java program I made in Java that counts the number of words and number of lines in of an inputted String. Check this out! import java.util.Scanner; public class PrintPerWord { public static void main(String[] args) { Scanner read = new Scanner(System.in); String myString = new String(); System.out.print("Please enter any string: "); myString = read.nextLine(); int line = 0, let = 0, size