Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (tmagloire1):

please help with his programming question Which of the following statements does not contain an error? I. System.out.print("/tab Age in Minutes: " + ageInMinutes + "/n"); II. System.out.print("/t Age in Minutes: " + ageInMinutes + "/n"); III. System.out.print("\t Age in Minutes: " + ageInMinutes + "\n");

OpenStudy (e.mccormick):

OK, the change in each of these is pretty obvious, /t, /tab, and \t at the start. Which of those actually adds a tab?

OpenStudy (tmagloire1):

/tab ? @e.mccormick

OpenStudy (tmagloire1):

i meant /t*

OpenStudy (e.mccormick):

You have your slashes confused. =) On this page: http://docs.oracle.com/javase/tutorial/java/data/characters.html Sroll down just a little bit to "Escape Sequences" and you will see it.

OpenStudy (tmagloire1):

Ohh okay so its \t

OpenStudy (e.mccormick):

yah. And since only one answer uses the correct \t...

OpenStudy (tmagloire1):

Thank you!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!