Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Objects Delivering the MVP Review Arrays

the answer for this question is wrong

it is unclear what the array is. I believe it is [java, helloworld, luke, skywalker]

whether "java" is considered part of the array or not, the correct answer is not listed.

The correct answer is either "helloworld" or "luke"

1 Answer

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, casey echternacht ! No, the question is not wrong. When you run the command that is given in the console:

java HelloWorld Luke Skywalker

java is the command to run the file. HelloWorld is the name of the Java class. It's telling it which class to run. The args array is anything that comes after the class name. So the array would be ["Luke", "Skywalker"]. The string at the index of 1 of args then, is "Skywalker".

Hope this helps! :sparkles: