Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Very simple question  RSS feed

 
Vlada Den
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!

How can I change this line, so "only tabs would separate the values in toString()", as teacher wrote to me:

public String toString() {
return("UserID: " + userID +
"\t Name: " + name +
"\t TelephoneNo: " + telephoneNo);
}
}

Thanks a lot in advance,

Vlada
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you mean changing "\t Name: " to "\tName: " or "\tName:"?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!