• Post Reply Bookmark Topic Watch Topic
  • New Topic

telephone attribute & escape sequence.  RSS feed

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I hav 2 questions:

1. Is there an escape sequence to 'return back a line'?(the oposite of '\n')

2. I have an attribute 'telephone' & I don't know which identifier to use with it. (I heard 'int' is not so good to be used with 'telephone')
I firstly tried 'int', but maybe 'String' would be better or something else? Does someone have an idea on this?
 
Sheriff
Posts: 21135
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) the backspace character, usable as (char)8, '\u0008' or '\b' can sometimes do what you need, but not always.

2) Seeing as you want to keep the leading zeros, a string is better most of the time. You have to check the string however, to see if it doesn't have any invalid characters like letters and such.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!