Kotlinlearncs.online LogoJava
Return to List

Homework: Print First Element

Created By: Ellen Spertus
/ Version: 2023.12.0

Create a function named printFirst() that takes an array of strings as an argument and either prints "The array is empty." or the first element. For example, if passed the one-element array holding "hello", it would print "hello".

Related Lessons

Stuck? You may find these lessons helpful: