Previous Next
0 / 15
Module DEMO-33-71DEMO-OOP-33

Message Token Joiner

DEMO-OOP-33 โ€ข Object Oriented Programming

Browser-only practice

Problem Statement

Create a helper class that stores three tokens, joins them with a colon, and prints the joined string with its total length.

Input Format

Input is given as whitespace-separated tokens in this order:

  1. first token
  2. second token
  3. third token

Output Format

Print the exact report in this order:

  1. Joined
  2. Length

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
deep
code
lab
Joined: deep:code:lab
Length: 13
Input: first token = "deep", second token = "code", third token = "lab".
Key calculation(s): tokens = new ArrayList<>() | tokens.add("deep") | "Joined: " + joined = "Joined: deep:code:lab".
Output:
Joined: deep:code:lab
Length: 13
Sample #2
Public sample
one
two
three
Joined: one:two:three
Length: 13
Input: first token = "one", second token = "two", third token = "three".
Key calculation(s): tokens = new ArrayList<>() | tokens.add("one") | "Joined: " + joined = "Joined: one:two:three".
Output:
Joined: one:two:three
Length: 13

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings