004-005-010

Array Initialization with Literals

Easy

Problem Description

Array Initialization with Literals

Learning Objective: Understand array initialization using array literals

Overview

Initialize an array using array literals (curly brace notation) and output each element.

Specifications

  • Initialize a String array with {"Apple", "Banana", "Cherry"}
  • Output each element on a separate line

Output Format

Apple
Banana
Cherry

Ready to Try Running Code?

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

Don't have an account?