(String args[])
| 9 | |
| 10 | public class strcat { |
| 11 | public static void main(String args[]) throws IOException { |
| 12 | int n = Integer.parseInt(args[0]); |
| 13 | String hello = "hello\n"; |
| 14 | StringBuffer stringBuffer = new StringBuffer(32); |
| 15 | |
| 16 | for (int i=0; i<n; i++) { |
| 17 | stringBuffer.append(hello); |
| 18 | } |
| 19 | |
| 20 | System.out.println(stringBuffer.length()); |
| 21 | } |
| 22 | } |