Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 4 Select statement(s) that is/are true about IDE. You must have an IDE to develop Java programs. You must have an IDE to run

QUESTION 4 Select statement(s) that is/are true about IDE. You must have an IDE to develop Java programs. You must have an IDE to run a Java program. You can develop Java programs without using an IDE. 10 points QUESTION 5 The source code of the following Java program is saved in a file named ______. public class Test { // empty body } Test Test.java Test.class test 10 points QUESTION 6 When the following code is compiled, the bytecode is saved in a file named ______. public class Test { // empty body } Test Test.java Test.class Test.exe 10 points QUESTION 7 How many methods are there in the following program? Use numeric value for your answer. public class TestProgram { public static void main(String[] args) { System.out.println("This is a test."); } } 2 10 points QUESTION 8 To answer this question, you are allowed to implement and test the program. Study the following program. It has ___ methods; when it runs, it outputs ___. public class TestProg { public static void output(String s) { System.out.println(s); } public static void main(String[] args) { output("2"); } } It has two methods; when it runs, it outputs 2. It has three methods; when it runs, it outputs 2. It has three methods; when it runs, it outputs "2". (Note: this choice include quotation marks in the output). It has two methods; when it runs, it outputs "2". (Note: this choice include quotation marks in the output). 10 points QUESTION 9 The Math class of the Java API has a method declaration shown below: public static int abs(int a) The name of the method is , the return data type of the method is . 10 points QUESTION 10 Indicate the statements that are true about Java programming lanaguage. 1. It is case sensitive. 2. Each statement ends with a period. 3. The body of a class may contain multiple methods. 4. You may use // to comment out a single line and /* */ to comment out multiple lines of code. 10 points QUESTION 11 The question requires you to have completed the Random program (page 13). Modify the body of the getNumber method so it looks like the following. return (int)(2+3*Math.random()); Save. Make sure there is no syntax error. Run the program two to six times. What is the value of the random number generated by the updated program? If you saw several different values, pick any one of them. Note: this question concerns the random number, not its square (which is also printed by the program). 10 points QUESTION 12 Use Eclipse to implement the Random program (page 13, Figure 1.10). Run the implemented program. Copy and paste your source code and the output of your program. Path: pWords:0 20 points Click Save and Submit to save and submit. Click Save All Answers to save all answers.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

=+3. What resources will these tactics require?

Answered: 1 week ago

Question

3. Identify challenges to good listening and their remedies

Answered: 1 week ago

Question

4. Identify ethical factors in the listening process

Answered: 1 week ago