Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CH1Q4 {
- public static void main (String [] args) {
- //Prints the statement on one line.
- System.out.println("Knowledge is power");
- //Prints a newline (skips a line).
- System.out.println("\n");
- //Prints the statement with each word centered relative to the other.
- System.out.println("Knowledge");
- System.out.println(" is ");
- System.out.println(" power ");
- //Prints a newline (skips a line).
- System.out.println("\n");
- //Prints the statement in a box.
- System.out.println("======================");
- System.out.println("| Knowledge is power |");
- System.out.println("======================");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment