Computer Science, asked by bivaschand416, 1 year ago

Write a program to Input a string.print count of articles within the string

Answers

Answered by Zisha7
0

Answer:

You can count words in Java String by using the split() method of String. A word is nothing but a non-space character in String, which is separated by one or multiple spaces. By using regular expression to find spaces and split on them will give you an array of all words in given String.

The string count() method returns the number of occurrences of a substring in the given string. In simple words, count() method searches the substring in the given string and returns how many times the substring is present in it.

Answered by Anonymous
0

Answer:

it is a program in which input a string print count of articles within the string of small text file in our computer

Similar questions