Hi Yogesh,
Please help me with below program?
Instructor
Yogesh Chawla Replied on 24/07/2021
Check this:
public class FilterWordsFromArray {
public static void main(String[] args) {
String[] input = {"ABCDE","BCDEFR","ABFRE","SWDER","HGD", "ABC"};
for(int i=0; i < input.length; i++) {
if (input[i].startsWith("A") && input[i].length() > 4) {
System.out.print(input[i] + " ");
}
}
}
}
Change the input array according to how you need.
Thanks Yogesh