Advertisement
otaviodantas

Untitled

Jun 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Compara {
  3. public static void main(String[] args) {
  4. Scanner s = new Scanner(System.in);
  5. System.out.println("Digite a palavra");
  6. String palavra = s.nextLine();
  7.  
  8.  
  9. for(int i = 0; i < palavra.length(); i++)
  10. {
  11. char compara[]=palavra.toCharArray();
  12.  
  13. if(compara.equals(compara)){
  14.  
  15. System.out.println("s[" + i + "] " + "é maiuscula" );
  16. }
  17.  
  18. }
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement