013-001-010

Using Basic String Class Methods

Easy

Problem Description

Using Basic String class Methods

In this problem, you will create a program that calls length(), charAt(0), and toUpperCase() on an input string and displays the results to standard output.

Learning Objective: Understand basic String class methods (length, charAt, toUpperCase)

Overview

Read a string from Scanner and output its length, first character, and uppercase conversion.

Specifications

  1. Read one line from Scanner
  2. Print Length: <char count>
  3. Print First: <first character>
  4. Print Upper: <uppercase>

Input Example

hello

Output Format

Length: 5
First: h
Upper: HELLO

Ready to Try Running Code?

Log in to access the code editor and execute your solutions for this problem.

Don't have an account?

Sign Up