????
package com.codegym.task.task09.task0923;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.concurrent.atomic.AtomicBoolean;
/*
Vowels and consonants
*/
public class Solution {
public static char[] vowels = new char[]{'a', 'e', 'i', 'o', 'u'};
public static void main(String[] args) throws Exception {
// write your code here
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<Character> l1 =new ArrayList<>();
ArrayList<Character> l2 = new ArrayList<>();
String s= br.readLine();
char[] c=s.toCharArray();
for (int i=0;i<c.length; i++)
{
if(isVowel(c[i]))
l1.add(c[i]);
else
l2.add(c[i]);
}
for (int i=0; i<l1.size(); i++)
{
System.out.print(l1.get(i) + " ");
}
System.out.println();
for (int i=0; i<l2.size(); i++)
{
System.out.print(l2.get(i) + " ");
}
}
// The method checks whether a letter is a vowel
public static boolean isVowel(char c) {
c = Character.toLowerCase(c); // Convert to lowercase
for (char d : vowels) // Look for vowels in the array
{
if (c == d)
return true;
}
return false;
}
}