IT-Academy

Stringy Velkost

Aug 14th, 2016
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6.  
  7. /**
  8.  *
  9.  * @author Miroslav
  10.  */
  11. public class Main {
  12.  
  13.     /**
  14.      * @param args the command line arguments
  15.      */
  16.     public static void main(String[] args) {
  17.         // TODO code application logic here
  18.         String s = "x";
  19.         StringBuilder sb = new StringBuilder("s");
  20.         while (true) {
  21.            // s += s;
  22.            sb.append(sb);
  23.             System.out.println("Size: " + sb.length());
  24.             // String aj StringBuidler 536 870 912
  25.         }
  26.     }
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment