user4345738
user4345738

Reputation: 191

Java String tab

when you do a method signature as:

public void print(String tab) 

and you call it as print(""), what is the effect?

Since I have to use:

 +tab+ 

to get an actual effect of a tab.

If I call it as :

print("\t");

would I still need to write +tab+ in the code to cause a tab?

Upvotes: 2

Views: 227

Answers (1)

Paul Lo
Paul Lo

Reputation: 6148

You can pass in string "\t":

print("\t")

Upvotes: 1

Related Questions