编写一个java程序,其中包含一个名为getVowel()的函数,该函数接受一个链表

编写一个java程序,其中包含一个名为getVowel()的函数,该函数接受一个链表,java,algorithm,data-structures,linked-list,Java,Algorithm,Data Structures,Linked List,使用java.util.LinkedList编写一个java程序,其中包含一个名为getVowel的函数,该函数接受类型字符串的链接列表,并仅返回包含元音字母作为第一个字母的数据值 说明:如果linkkedList中的初始数据值为[Algorithms,data,Computer,Information],则GetVowell的返回值必须仅为[Algorithms,Information],因为它们是唯一以元音字母开头的数据值,例如Algorithms中的a和Information中的I 函数G

使用java.util.LinkedList编写一个java程序,其中包含一个名为getVowel的函数,该函数接受类型字符串的链接列表,并仅返回包含元音字母作为第一个字母的数据值

说明:如果linkkedList中的初始数据值为[Algorithms,data,Computer,Information],则GetVowell的返回值必须仅为[Algorithms,Information],因为它们是唯一以元音字母开头的数据值,例如Algorithms中的a和Information中的I

函数Get元音不存在


我认为您需要编写如下方法或函数:

private LinkedList<String> getVowel(LinkedList<String> originalList)
{
    // put your implementation/code here
}
在方法内部,构建并返回一个新的链表,其中只包含原始列表中所需的元素

在main方法中,调用getVowel方法并打印它返回的内容


愉快的编码。

这是您实现方法列表GetWordsStartingWith元音输入列表的任务。你不能在Java集合中的LinkedList实例上调用Get元音。附带问题:捕获NullPointerException e{…}-永远不要这样做对不起,我不是很好,你能用inv编写代码吗?这不是我的家庭作业,我的朋友挑战我你的朋友认为我解决这个挑战是个好主意吗?也许你可以说服你的朋友在这里发表评论?我不想失去我清楚的理解。在我的家乡,欺骗朋友更糟糕。
private LinkedList<String> getVowel(LinkedList<String> originalList)
{
    // put your implementation/code here
}