From cd43a87e9bcfc78d51d533ef74bcb21196488984 Mon Sep 17 00:00:00 2001 From: Aadit Agrawal Date: Mon, 14 Oct 2024 02:39:38 +0530 Subject: [PATCH] Upload files to "OOP/Java/Lab/Week9" --- OOP/Java/Lab/Week9/arrange_array.java | 20 ++++++++++++++++++++ OOP/Java/Lab/Week9/concat_5.java | 15 +++++++++++++++ OOP/Java/Lab/Week9/replacing.java | 27 +++++++++++++++++++++++++++ OOP/Java/Lab/Week9/telephone.java | 13 +++++++++++++ OOP/Java/Lab/Week9/three_letter.java | 24 ++++++++++++++++++++++++ 5 files changed, 99 insertions(+) create mode 100644 OOP/Java/Lab/Week9/arrange_array.java create mode 100644 OOP/Java/Lab/Week9/concat_5.java create mode 100644 OOP/Java/Lab/Week9/replacing.java create mode 100644 OOP/Java/Lab/Week9/telephone.java create mode 100644 OOP/Java/Lab/Week9/three_letter.java diff --git a/OOP/Java/Lab/Week9/arrange_array.java b/OOP/Java/Lab/Week9/arrange_array.java new file mode 100644 index 0000000..28c5df8 --- /dev/null +++ b/OOP/Java/Lab/Week9/arrange_array.java @@ -0,0 +1,20 @@ + +import java.util.*; + +public class arrange_array { + public static void main(String[] args) { + int n; + Scanner sc = new Scanner(System.in); + System.out.println("Enter number of strings you would like"); + n = Integer.parseInt(sc.nextLine()); + System.out.println("Enter your strings"); + String[] arr = new String[n]; + for(int i = 0;i