Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

do System.out.print nEnter a positive integer value! (enter -1 to end) System.ou

ID: 3601893 • Letter: D

Question

do System.out.print nEnter a positive integer value! (enter -1 to end) System.out.print"That's not a numberfinEnter a positive integer value") k.next v k.nextint System.out.printin ("Good! You entered"+ v) while (v >0) las long as user enters a positive number it loops back System.out printin"End of program" ter toit,ie ANS: (2): ANS: (): ANS: 3)Gres Yen entered: 7 You would like to test run it under DOS with the following command line: C: Production> java Process monthly_ interest Test Run a which including main method. Will this DOS command line automatically entering into a test mode? Yes or No orUncertain 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 (2) ANS (3) class Test main_method public static void main (Stringl] z) if ( z[0].equals( Test") String s new String): ss+210]+ abc go!" System.out printin"String s contains:"+s):

Explanation / Answer

Ans:- No.

Explainstion:

The steps to rum java program in DOS is :-

1)Save thr program with java extension.

eg: filename.java

2)Open the command prompt in administrator mode.

3)Navigate to correct java folder.

4)Compile the program using following code:

C:Production javac filename.java

On compiling the program .class file is generated.This .class file contains the bytecode.

5) Run the program using:

C:Production java filename

Solution:

C:Production java Process_monthly_interest