title: Complex Print Statement
body: <p>So far what i have:</p>
  
  <p><strong>A directory which has two folders:</strong> </p>
  
  <ol>
  <li><p>..\Data\BeforeModern</p></li>
  <li><p>..\Data\AfterModern</p></li>
  </ol>
  
  <p>Each Folder(BeforeModern and AfterModern) has 4 JSON files namly (<strong>AU,UK,US,IND</strong>);</p>
  
  <p>The <strong>Json</strong> file contain a particular Fieldname(Language) which is of My interest.</p>
  
  <p>for example in AU JSON in BeforeModern the lang is </p>
  
  <pre><code>Language["English","Spanish"]
  </code></pre>
  
  <p>while in AFterModern the lang is something Like this:</p>
  
  <pre><code>Language["English","Spanish","Arabic"]
  </code></pre>
  
  <p>I want to print the result like the below:</p>
  
  <pre><code>         **BeforeModern**            **AfterModern**
              English                     English
  AU :        Spanish                     Spanish
                                          Urdu
  </code></pre>
  
  <p><strong>My approach till now:</strong></p>
  
  <pre><code>for (File beforeFile: new File(locationPath).listFiles()) {
              File afterFile= new File(locationPath.replace("BeforeModern", "AfterModern") + "\\" + locFile.getName());
  
              if (afterfile.exists()) {
                  ObjectMapper mapper = new ObjectMapper();
                  JsonNode tree1 = mapper.readTree(beforeFile); //Parse Specific JSON from BeforeModern Location
                  JsonNode tree2 = mapper.readTree(afterFile); //Parse Specific JSON from AfterModern Location
                  if (tree1.has("Language") &amp;&amp; tree2.has("Language")) {
                      JsonNode sup_loc = tree1.get("Language");
                      List&lt;String&gt; list1 = new ArrayList&lt;&gt;();
                      sup_loc.forEach(l -&gt; list1.add(l.asText()));
                      JsonNode sup_rent = tree2.get("Language");
                      List&lt;String&gt; list2 = new ArrayList&lt;&gt;();
                      sup_rent.forEach(l -&gt; list2.add(l.asText()));
                      int rows = Math.max(list1.size(), list2.size());
  
  
                      Map&lt;String, String&gt; hash= new HashMap&lt;&gt;();
                      for (int i=0;i&lt;rows;i++){
                          hash.put(list1.get(i),list2.get(i));
                      }
                      Map&lt;String,Map&lt;String,String&gt;&gt; map = new HashMap&lt;&gt;();
                      map.put(beforeFile.getName(),hash);
                      map.entrySet().forEach((k)-&gt;System.out.println(k.getKey()+"                                                "+k.getValue()));
                      //hash.entrySet().forEach((k)-&gt;System.out.println(k.getKey()+"                         "+k.getValue()));
                      System.out.println("________________________________________________________________________________");
  </code></pre>