You should have a single command-line argument representing number of objects you must generate for the user.
Just wanted to make sure that I got this one right.
Does this mean we should pass the params to the main method?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your Java program needs to be invoked from the command prompt, say for example, MyProgram.java is a source file which contains the
main()method, you compile this using the javac compiler by doingjavac MyProgram.javaat the command prompt to get the MyProgram.class file. This .class file is then invoked by doingjava MyProgramat the command prompt to run your program.What you need to do here is pass parameters to the
main()method when you run your program simply by doingjava MyProgram <your params go here>