pls help🙏🙏
package com.codegym.task.task09.task0923;
import java.io.BufferedReader;
import java.io.InputStreamReader;
/*
Vowels and consonants
*/
public class Solution {
public static char[] vowels = new char[]{'a', 'e', 'i', 'o', 'u'};
public static char getCharFromString (String str, int index){
return str.toCharArray()[index];
}
public static void main(String[] args) throws Exception {
// write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String s = reader.readLine();
int n = s.length();
char[] ch = new char[n];
for (int i=0; i<n; i++){
char a = getCharFromString (s, i);
ch[i] = a;
}
for (int i=0; i<n; i++){
if (isVowel(ch[i])){
System.out.print(ch[i]);
}
System.out.println();
for (int i=0; i<n; i++){
if (!isVowel(ch[i])){
System.out.print(ch[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;
}
}