Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Compara {
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- System.out.println("Digite a palavra");
- String palavra = s.nextLine();
- for(int i = 0; i < palavra.length(); i++)
- {
- char compara[]=palavra.toCharArray();
- if(compara.equals(compara)){
- System.out.println("s[" + i + "] " + "é maiuscula" );
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement