
Hi, I have 2 arrays:
String [] head = {"Name", "Date of birth", "PPS number"};
String [] personal= {value1, value2, value3};
I want this 2 arrays to be printed out in the following manner:
head[0] tab personal[0] head[1] tab personal[1] head[2] tab personal [2]
I tried different options and can't get this working properly. Any suggestions? Many thanks in advance!
Rafal

Try this code:
for(int i=0; i

for(int i=0; i<person.length; i++)
{
System.out.println(head [i]+"\t"+personal [i]);
}

HI!
Thanks for your reply.
Your solution did not work since I'm using GUI (JFrame) but below workaround worked for me:
fieldTaxReceipt.setText(personalHead[0] + "\t" +
personal[0] + "\n" + personalHead[1] + "\t" + personal[1] + "\n" + personalHead[2] + "\t" + personal[2] + "\n");
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.