Java Question 24 You are testing a java class written by a software developer co
ID: 3601881 • Letter: J
Question
Java Question
24 You are testing a java class written by a software developer company, and the class name is: Process mo You would like to test run it under DOS with the following command line: C: Production java Process_monthly_interest Test Run Will this DOS command line automatically entering into a test mode? ANS: circle Yes or No or Uncertain What are the reasons of your answer? 25 Will the following program work all the time? If the program will crash at some point, explain under what run condition the program will crash. If you run the class under DOS and attached at end of the bytecode with an argument: Test. What will be displayed Under what run situation that the class will run smoothly to finish, explain in detail. ANS (1) ANS (2) ANS (3) ANS (4) class Test_main_method public static void main (Stringl] z) if ( z[0J.equals("Test")) String s = new String(); s = s+z[0]+" abc go!"; System.out.println("String s contains: "+s);Explanation / Answer
Answer : NO
There is no command RUN TEST in java ,
javac and java is the command that will help us test the code
Ans(1) : NO
Ans(2) : If we do not enter String through command line, the Program will crash because we are checking
z[0]
Ans(3) : Output will be : String s contains Test abc go!
Ans(4) : if we check if(z.length() >0 && z[0].equals("Test"))
Under this condition, the program will run smoothly to finish
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.