How to print specific elements from an array of string, ignoring int and special characters at the same time?

Well, hello

What i want to do is basically.
==================
Sarah ID 1059
Jones ID 2095
Chris ID 5059
Samantha ID 3506
================

I took input in an array of string. I want to manipulate the elements and print them in this way.

=================
Welcome Sarah ID “1059” Sarah GoodBye
Welcome Jones ID “2095” Jones GoodBye
Welcome Chris ID “5059” Chris GoodBye
Welcome Samantha ID “3506” Samantha GoodBye
=================
This is the code i have prepared so far with the help of others, but i am stuck on the part where i want to print only specific elements while ignoring integer and special characters from being printed.

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
String[] names = jTextArea1.getText().split(“.”);
for(int i=0;i
Source: java

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.