This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static void xo(int a) { | |
| for (int i = 0; i < a; i++) { // rows | |
| for (int j = 0; j < a; j++) { // columns | |
| if (j == i || j == a - 1 - i) { | |
| System.out.print("x"); | |
| } else { | |
| System.out.print("o"); | |
| } | |
| } | |
| System.out.println(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static <t> String fencePost(t[] a, String post){ | |
| StringBuilder sb = new StringBuilder(); | |
| for (t comp : a) { | |
| if (sb.length() != 0) sb.append(post); | |
| sb.append(comp); | |
| } | |
| return sb.toString(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.project.fileSearch; | |
| import java.io.File; | |
| import java.io.FilenameFilter; | |
| import java.net.URL; | |
| import java.util.List; | |
| public class ClassFinder{ |