Print Text with Tab Escape Sequence
This program demonstrates the tab escape sequence.
Problem Statement
Write a Java program that prints text using the tab escape sequence.
Source Code
| 1 | public class TabEscape { |
| 2 | public static void main(String[] args) { |
| 3 | System.out.println("Eduinq\tJava\tPrograms"); |
| 4 | } |
| 5 | } |
Program Output
Eduinq Java Programs
Explanation
\t Inserts a tab space. Prints words separated by tabs. Conclusion: Shows how tab escape sequence can align text.