ASCII_Art.java 827 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2018 Muhammad M. Imtiaz
  2. // This Work is subject to the terms of the Universal Permissive License,
  3. // Version 1.0. If a copy of the licence was not distributed with this Work,
  4. // you can obtain one at <https://oss.oracle.com/licenses/upl/>.
  5. /**
  6. * Muhammad M. Imtiaz
  7. * Friday 28 September 2018
  8. * Prints a star-like object in ASCII art, making sure to escape special characters and use "\n" with System.out.print instead of using System.out.println.
  9. **/
  10. class ASCII_Art {
  11. public static void main(String[] args) {
  12. String[] lines = { " /\\",
  13. " / \\",
  14. " / \\",
  15. "------ ----",
  16. "\\ /",
  17. " \\ /",
  18. " / /\\ \\",
  19. " / / \\ \\",
  20. "|_____/ _____\\|"
  21. };
  22. for(String line : lines)
  23. System.out.print(line + "\n");
  24. }
  25. }