Hi,
I am new to this forum and I hope that I will learn more about Java in this web site.
Anyway, I have created a code:
Code:
public class WordCount {
public static void main(String[] args) {
//Text string to be analysed
String text = "Process of planning and implementing"
+" the development and distribution of goods"
+" to fulfil and produce profits.";
int words = 0;
//Analyse all the characters in the string
int textLength = text.Length();
for(int i = 0; i < textLength; i++) {
//Check for words
if(Character.isWord) {
words++;
}
}
System.out.println("The Text contained words: " + words + "\n");
}
}
Is this correct as to what I want to produce??
Also, where do I have to include, what code, to get CONSOLE WINDOW??
Thanks in Advance.