From 1c39fe1c1e90e29b5281de8acc73939c120982fc Mon Sep 17 00:00:00 2001 From: Muhammad Waleed Ahmad <115546135+MuhammadWaleed-0786@users.noreply.github.com> Date: Sun, 15 Oct 2023 01:11:25 +0500 Subject: [PATCH] Create StringExample.java StringExample.java --- StringExample.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 StringExample.java diff --git a/StringExample.java b/StringExample.java new file mode 100644 index 00000000..5d70db1b --- /dev/null +++ b/StringExample.java @@ -0,0 +1,11 @@ +public class StringExample { + public static void main(String[] args) { + String message = "Java Programming"; + + System.out.println("Original Message: " + message); + System.out.println("Length: " + message.length()); + System.out.println("Uppercase: " + message.toUpperCase()); + System.out.println("Substring: " + message.substring(5, 14)); + System.out.println("Reversed: " + new StringBuilder(message).reverse().toString()); + } +}