diff options
-rw-r--r-- | blasearch.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/blasearch.java b/blasearch.java index 8137fd0..9fbd1b5 100644 --- a/blasearch.java +++ b/blasearch.java @@ -39,7 +39,6 @@ public class blasearch { // Remove trailing + query = query.substring(0, query.length()-1); - System.out.println(query); String[] parts = null; //URL which provides XML response URL url = new URL("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q="+ query); @@ -73,10 +72,14 @@ public class blasearch { // Print results if(results != null){ for(int i=0; i<2; i++){ + if (i != 0) { + System.out.print(" | "); + } int count = i + 1; - System.out.print("Result " + count + ": " + results.get(i) + " | "); + System.out.print("Result " + count + ": " + results.get(i)); } } + System.out.print("\n"); } } |