From 6f16f730b2b3e5c8d19ead6176fe80edb1b7cecb Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Tue, 16 Jan 2024 12:21:42 +0800 Subject: [PATCH] added test code --- src/xs_ibdpcompsci_javaintro/hello.java | 30 +++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/xs_ibdpcompsci_javaintro/hello.java diff --git a/src/xs_ibdpcompsci_javaintro/hello.java b/src/xs_ibdpcompsci_javaintro/hello.java new file mode 100644 index 0000000..3b6bcb1 --- /dev/null +++ b/src/xs_ibdpcompsci_javaintro/hello.java @@ -0,0 +1,30 @@ +package xs_ibdpcompsci_javaintro; +import java.util.*; + +public class hello { + static String request_input() { + // import the input + Scanner input = new Scanner(System.in); + + // Create the variable. + String USER_INPUT; + USER_INPUT = input.nextLine(); + + System.out.println(USER_INPUT); + + input.close(); + return USER_INPUT; + }; + + static void analyze(String TEXT_SOURCE) { + System.out.println(TEXT_SOURCE.length()); + } + + + public static void main() { + //String + String TEXT_TOANALYZE; + TEXT_TOANALYZE = request_input(); + analyze(TEXT_TOANALYZE); + } +}