title: java program to count the number of words that starts with capital letters
body: <p>I want to write a program that count the number of words that starts with capital letters. It only count no. Of capital letter not word try this line 
  "Hi hOw are yOu"
  According to my code output will be 3
  But their is only 1 word that starts with capital letter that is 'Hi'...so how can I solve these problem..Please help me with this.</p>
  
  <pre><code>import java.util.*;
  
  class Cap
  {
      public static void main(String m[])
      {
          Scanner in=new Scanner(System.in);
          String s=new String();
          System.out.println("Enter a line:");
          s=in.nextLine();
          char c;
          int ct=0;
          for(int i=0;i&lt;s.length();i++)
          {
              c=s.charAt(i);
              if(c&gt;=65 &amp;&amp; c&lt;=90)
              {
                  ct++;
  
              }
          }
          System.out.println("total  number of words start with capital letters are :"+ct);
      }
  }
  </code></pre>