java - Why aren't arguments working in eclipse? -


i trying learn how code java , learning arguments using eclipse. reading book sam's teach java in 24 hours , following book completely; however, not working in eclipse. code following:

public class blankfiller {     public static void main(string[] args) {         system.out.println("the " + arguments[0]                 + " " + arguments[1] + " fox "                 + "jumped on "                 + arguments[2] + " dog.");     } } 

then put arguments in going runrun configurationsarguments , type in "retromingent purple lactose-intolerant" program arguments tab, hit apply run gives me error:

exception in thread "main" java.lang.error: unresolved compilation problem         arguments cannot resolved variable         arguments cannot resolved variable         arguments cannot resolved variable          @ blankfiller.main(blankfiller.java:4) 

what doing wrong?

you named formal parameter args trying use variable arguments in body of method. change 1 or other match.

by way—welcome so. in future, please don't post code on separate web site that. unless absolutely necessary otherwise, include relevant directly in question itself.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -