How to insert multiple tabs string in java?

Your example should work; however there’s no reason to append each tab character individually. This works, too:

getName() + "\t\t" + getLastName();

The errors you are getting are not related to the tab characters.

Leave a Comment