Advertisement
Guest User

Untitled

a guest
Oct 7th, 2021
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. public class Main {
  2.  
  3.  
  4.  
  5.     public static void main(String[] args) {
  6.     // write your code here
  7.  
  8.         Scanner scan = new Scanner(System.in);
  9.  
  10.         String str;
  11.         System.out.println("Unesite vasu recenicu ");
  12.         str=scan.nextLine();
  13.         String result="";
  14.  
  15.         String[] arr=new String[200];
  16.  
  17.         for (int i=0;i<str.length();i++){
  18.             arr=str.split(" ",i);
  19.         }
  20.  
  21.         for (int i=0;i<arr.length;i++){
  22.             if (!Character.isUpperCase(arr[i].toCharArray()[0])){
  23.                 result+=arr[i]+" ";
  24.             }
  25.         }
  26.  
  27.         System.out.println(result);
  28.  
  29.  
  30.  
  31.  
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement