From 5f06af9335e7f6651c4ebcf819d8fee38f5d11e2 Mon Sep 17 00:00:00 2001 From: StaticCSMajor Date: Thu, 21 Apr 2016 18:33:58 -0500 Subject: [PATCH] Update MapApp.java I fixed some of the spacing for you. --- java-list-map/src/main/java/com/hmkcode/MapApp.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/java-list-map/src/main/java/com/hmkcode/MapApp.java b/java-list-map/src/main/java/com/hmkcode/MapApp.java index 62def271..bf4d2fa3 100644 --- a/java-list-map/src/main/java/com/hmkcode/MapApp.java +++ b/java-list-map/src/main/java/com/hmkcode/MapApp.java @@ -12,11 +12,9 @@ import com.hmkcode.vo.Person; -public class MapApp -{ +public class MapApp { - public static void main( String[] args ) - { + public static void main( String[] args ) { // ( 1 ) Map @@ -47,8 +45,7 @@ public static void main( String[] args ) } // --> print System.out.println("--------- Print Iterate by Entry -------------"); - for(Entry entry:treeMap.entrySet()){ - + for(Entry entry:treeMap.entrySet()) { System.out.println("treeMap: [key: "+entry.getKey()+" , value: "+entry.getValue()); } @@ -71,7 +68,7 @@ public static void main( String[] args ) System.out.println("List: "+persons); } - private static Person[] getPersons(){ + private static Person[] getPersons() { Person[] persons = new Person[5]; persons[0] = new Person("Brit", 29); @@ -95,4 +92,4 @@ public int compare(Object keyA, Object keyB){ return ((String) keyA).compareTo((String) keyB); } -} \ No newline at end of file +}