Java Java Objects Delivering the MVP Arrays and Command Line Arguments

Why is it args.length and not array (or the name of the array.legnth)

Why is it args.length and not array (or the name of the array.legnth)

1 Answer

Rich Zimmerman
Rich Zimmerman
24,056 Points

args is the name of the array. args is passed as a parameter so you can reference it within a method/function by the name 'args'