(String[] args)
| 52 | } |
| 53 | |
| 54 | public static void main(String[] args) { |
| 55 | Scanner sc = new Scanner(System.in); |
| 56 | System.out.print("Enter number of words: "); |
| 57 | int n = sc.nextInt(); |
| 58 | String[] words = new String[n]; |
| 59 | System.out.println("Enter words:"); |
| 60 | for (int i = 0; i < n; i++) |
| 61 | words[i] = sc.next(); |
| 62 | |
| 63 | System.out.print("Enter max width: "); |
| 64 | int maxWidth = sc.nextInt(); |
| 65 | |
| 66 | Solution sol = new Solution(); |
| 67 | List<String> result = sol.fullJustify(words, maxWidth); |
| 68 | |
| 69 | System.out.println("\nJustified Text:"); |
| 70 | for (String line : result) |
| 71 | System.out.println('"' + line + '"'); |
| 72 | } |
| 73 | } |
nothing calls this directly
no test coverage detected