relative easy Java question?

NeoMadHatter

Platinum Member
Nov 29, 2000
2,355
0
0
johntwang.com
how do i print data separating them by tabs instead of spaces or anything else?

say i have a vector h that has the elements, [ 3, 4 ,5]

so it would be like,

for (int s = 0 ; s< h.size() ; s++)
System.out.print (" " + h.get(s));

would print it separated by spaces. so this output is:
3 4 5

i want those spaces to be tabs instead. anyone know?
 

Yomicron

Golden Member
Mar 5, 2002
1,735
1
81
System.out.println("\t" + h.get(s));

EDIT: oops, as Atticu5 pointed out, the 'ln' shouldn't be there.