Special Characters | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Special Characters

I have noticed that in some strings, certain characters appear that have special functions, like (if I am not mistaken) "%t", which I believe gives the current time. Could someone explain to me what the list of these special characters are, and, if possible, how Java understands and interprets them?

17th Oct 2017, 9:59 PM
Quantallax
2 Answers
+ 6
All the best to your rubber ducking approach! 😉 Here's a good read for you:- https://dzone.com/articles/java-string-format-examples
18th Oct 2017, 2:27 AM
Zephyr Koo
Zephyr Koo - avatar
+ 1
So I was looking to an answer for my question, and I believe I have an answer. If you create a "Date" Object (imported in Java.util), supposedly, that holds the current date and time. If you print it out, it prints the current date and time. Let me check to make sure.
17th Oct 2017, 10:04 PM
Quantallax