From 103a8b564dd8f4a773f40d96d1209d9199efe934 Mon Sep 17 00:00:00 2001 From: Norawit Hempornwisarn Date: Sun, 28 Aug 2016 21:59:02 +0700 Subject: [PATCH] Implement greetingMessage() and bubbleSort() --- src/main/java/Hello.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/Hello.java b/src/main/java/Hello.java index 433e3b5..950756a 100644 --- a/src/main/java/Hello.java +++ b/src/main/java/Hello.java @@ -13,11 +13,21 @@ public static void main(String[] args) { public static String greetingMessage(String name){ // TODO Return string in this format - "Hello, " + given name. - return ""; + return "Hello, " + name; } public static int[] bubbleSort(int[] array){ // TODO Sort the given array in an ascending order and return the sorted array. + int tmp; + for(int i=0 ; iarray[j+1]){ + tmp=array[j]; + array[j]=array[j+1]; + array[j+1]=tmp; + } + } + } return array; }