CodeCodeCode

CH1Q4

Mar 29th, 2011
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. public class CH1Q4 {
  2.     public static void main (String [] args) {
  3.         //Prints the statement on one line.
  4.         System.out.println("Knowledge is power");
  5.         //Prints a newline (skips a line).
  6.         System.out.println("\n");
  7.         //Prints the statement with each word centered relative to the other.
  8.         System.out.println("Knowledge");
  9.         System.out.println("   is    ");
  10.         System.out.println("  power  ");
  11.         //Prints a newline (skips a line).
  12.         System.out.println("\n");
  13.         //Prints the statement in a box.
  14.         System.out.println("======================");
  15.         System.out.println("| Knowledge is power |");
  16.         System.out.println("======================");
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment