Skip to content

Commit 23cb018

Browse files
committed
feat: Demonstrate tab character usage in println [tab-char-demo]
🔑 Key: tab-char-demo 🧠 Logic: - Prints a string using `\t` escape character to insert a horizontal tab. - `"Name:\tJohn"` aligns output in a spaced format, like: Name: John 📘 Purpose: - Shows how `\t` creates uniform spacing between content. - Useful in console UIs, tabular data display, and formatting structured output. 💡 Tip: - Multiple `\t` can be chained for more spacing. Signed-off-by: Somesh diwan <[email protected]>
1 parent 43ec037 commit 23cb018

File tree

1 file changed

+6
-0
lines changed
  • JDK Features/Escape Sequences in Java/src

1 file changed

+6
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
public class Code2 {
2+
public static void main(String[] args) {
3+
// Tab
4+
System.out.println("Name:\tJohn");
5+
}
6+
}

0 commit comments

Comments
 (0)