Professional Documents
Culture Documents
Apka Guruji - (Hindi) Introduction To StringTokenizer in Java, Count Number of Words S...
Apka Guruji - (Hindi) Introduction To StringTokenizer in Java, Count Number of Words S...
[Hindi] Introduction to S…
Hello friends, in this video we discuss the string tokenizer class and show you how you can write a
program in java to process a sentence and count number or words starting with capital letter using this
class, the video tutorial is useful for isc board computer science students as well as java programming
enthusiasts, engineering students and those who are preparing for some kind of programming
interviews.
3eDNQ&t=0s&list=PLgiXCk_tuNJv-Q9hleIzgQarGKZwT1x5u&index=159
list=PLgiXCk_tuNJu7rgWB0ThCqJa4FXr43GTe
Q9hleIzgQarGKZwT1x5u
list=PLgiXCk_tuNJsPnymc9S8FSKUokGlmrxqM
Source Code:
import java.util.*;
class CountWords
private String s;
private int c;
public CountWords()
{
s = "";
c = 0;
}
{
s = sc.nextLine();
}
{
String w;
while(st.hasMoreTokens())
{
w = st.nextToken();
if(Character.isUpperCase(w.charAt(0)))
c++;
}
}
{
}
ob.input();
ob.compute();
ob.display();
}
Share
No comments:
Post a Comment
‹ Home ›
View web version
About Me
Apka Guruji
Follow 9
Powered by Blogger.