diff --git a/JAVA/HelloRecursively.java b/JAVA/HelloRecursively.java new file mode 100644 index 0000000..2372fac --- /dev/null +++ b/JAVA/HelloRecursively.java @@ -0,0 +1,15 @@ +public class HelloRecursively { + private void hello(int n) { + System.out.println(n); + if (n < 1) { + System.out.println("End"); + } else { + hello(n-1); + } + } + + public static void main(String[] args) { + HelloRecursively hr = new HelloRecursively(); + hr.hello(200); + } +} diff --git a/JAVA/bubble.java.txt b/JAVA/bubble.java similarity index 90% rename from JAVA/bubble.java.txt rename to JAVA/bubble.java index 1f2f58b..8de5c81 100644 --- a/JAVA/bubble.java.txt +++ b/JAVA/bubble.java @@ -10,7 +10,7 @@ public static void main(String[] args) System.out.print("\n Enter Size of Array\n"); n=sc.nextInt(); int [] a=new int[n]; - System.out.print("GIVE NUMBERS FOR ARRAY :"); + System.out.print("GIVE NUMBERS FOR ARRAY (separated by spaces):"); for( int i=0;i<=n-1;i++) { a[i]=sc.nextInt();