added test code
This commit is contained in:
parent
2bc53c5352
commit
6f16f730b2
1 changed files with 30 additions and 0 deletions
30
src/xs_ibdpcompsci_javaintro/hello.java
Normal file
30
src/xs_ibdpcompsci_javaintro/hello.java
Normal file
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue