Consider the program below: public class Test { public static void main(String[] args) { int[] a;...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the program below: public class Test { public static void main(String[] args) { int[] a; a new int[ 10 ]; for (int i = 0; i < a.length; i++) a[1] = 1+2: int result = 0; for (int i = 0; i < a.length; i++) resulta[i]; System.out.printf( "Result is: %d\n", result ); } // end main } // end class Test: The output of this program will be: a. Result is: 62. b. Result is: 64. c. Result is: 65. d. Result is: 66. 8. Consider the class below: public class Test (1 public static void main(String[] args) ( int[] a = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3 }; int result = 0; for (int i=0; i<a.length; i++) { if (a[i]> 30) result + a[ i]; } // end for System.out.printf( "Result is: %d\n", result); }//end main } // end class Test The output of this Java program will be: a. Result is: 280, b. Result is: 154. c. Result is: 286. d. Result is: 332. 9. Which of the following is not an algorithm? a. A recipe. b. Operating instructions. c. Textbook index. d. Shampoo instructions (lather, rinse, repeat). 10. Which of the following is true? a. Pseudocode is used to describe an algorithm. b. Pseudocode is translatable by the programmer into a programming language (like Java). c. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. d. All of the above Consider the program below: public class Test { public static void main(String[] args) { int[] a; a new int[ 10 ]; for (int i = 0; i < a.length; i++) a[ 1 ] = 1 + 2: int result = 0; for (int i = 0; i < a. length; i++) resulta[i]; System.out.printf( "Result is: %d\n", result); } // end main } // end class Test: The output of this program will be: a. Result is: 62. b. Result is: 64. c. Result is: 65. d. Result is: 66. 8. Consider the class below: public class Test (1 public static void main(String[] args) ( int[] a = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3 }; int result = 0; for (int i 0; i<a.length; i++) { if (a[i]>30) result + a[i]; } // end for System.out.printf( "Result is: %d\n", result); } // end main } // end class Test The output of this Java program will be: a. Result is: 280, b. Result is: 154. c. Result is: 286. d. Result is: 332. 9. Which of the following is not an algorithm? a. A recipe. b. Operating instructions. c. Textbook index. d. Shampoo instructions (lather, rinse, repeat). 10. Which of the following is true? a. Pseudocode is used to describe an algorithm. b. Pseudocode is translatable by the programmer into a programming language (like Java). c. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. d. All of the above Consider the program below: public class Test { public static void main(String[] args) { int[] a: a new int[ 10 ]; for (int i = 0; i < a.length; i++) a[ 1 ] = 1 + 2: int result = 0; for (int i System.out.printf( "Result is: %d\n", result ); } // end main } // end class Test. c. Result is: 65. d. Result is: 66. result+a[i]; The output of this program will be: a. Result is: 62. b. Result is: 64. 0; i< a.length; i++) 8. Consider the class below: public class Test (1 public static void main( String[] args) ( int[] a = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3 }; int result = 0; for (int i=0; i<a.length; i++) { if (a[i]> 30) result += a[i]; } // end for System.out.printf( "Result is: %d\n", result); }//end main } // end class Test The output of this Java program will be: a. Result is: 280, b. Result is: 154. c. Result is: 286. d. Result is: 332. 9. Which of the following is not an algorithm? a. A recipe. b. Operating instructions. c. Textbook index. d. Shampoo instructions (lather, rinse, repeat). 10. Which of the following is true? a. Pseudocode is used to describe an algorithm. b. Pseudocode is translatable by the programmer into a programming language (like Java). c. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. d. All of the above Consider the program below: public class Test { public static void main(String[] args) { int[] a; a new int[ 10 ]; for (int i = 0; i < a.length; i++) a[1] = 1+2: int result = 0; for (int i = 0; i < a.length; i++) resulta[i]; System.out.printf( "Result is: %d\n", result ); } // end main } // end class Test: The output of this program will be: a. Result is: 62. b. Result is: 64. c. Result is: 65. d. Result is: 66. 8. Consider the class below: public class Test (1 public static void main(String[] args) ( int[] a = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3 }; int result = 0; for (int i=0; i<a.length; i++) { if (a[i]> 30) result + a[ i]; } // end for System.out.printf( "Result is: %d\n", result); }//end main } // end class Test The output of this Java program will be: a. Result is: 280, b. Result is: 154. c. Result is: 286. d. Result is: 332. 9. Which of the following is not an algorithm? a. A recipe. b. Operating instructions. c. Textbook index. d. Shampoo instructions (lather, rinse, repeat). 10. Which of the following is true? a. Pseudocode is used to describe an algorithm. b. Pseudocode is translatable by the programmer into a programming language (like Java). c. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. d. All of the above Consider the program below: public class Test { public static void main(String[] args) { int[] a; a new int[ 10 ]; for (int i = 0; i < a.length; i++) a[ 1 ] = 1 + 2: int result = 0; for (int i = 0; i < a. length; i++) resulta[i]; System.out.printf( "Result is: %d\n", result); } // end main } // end class Test: The output of this program will be: a. Result is: 62. b. Result is: 64. c. Result is: 65. d. Result is: 66. 8. Consider the class below: public class Test (1 public static void main(String[] args) ( int[] a = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3 }; int result = 0; for (int i 0; i<a.length; i++) { if (a[i]>30) result + a[i]; } // end for System.out.printf( "Result is: %d\n", result); } // end main } // end class Test The output of this Java program will be: a. Result is: 280, b. Result is: 154. c. Result is: 286. d. Result is: 332. 9. Which of the following is not an algorithm? a. A recipe. b. Operating instructions. c. Textbook index. d. Shampoo instructions (lather, rinse, repeat). 10. Which of the following is true? a. Pseudocode is used to describe an algorithm. b. Pseudocode is translatable by the programmer into a programming language (like Java). c. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. d. All of the above Consider the program below: public class Test { public static void main(String[] args) { int[] a: a new int[ 10 ]; for (int i = 0; i < a.length; i++) a[ 1 ] = 1 + 2: int result = 0; for (int i System.out.printf( "Result is: %d\n", result ); } // end main } // end class Test. c. Result is: 65. d. Result is: 66. result+a[i]; The output of this program will be: a. Result is: 62. b. Result is: 64. 0; i< a.length; i++) 8. Consider the class below: public class Test (1 public static void main( String[] args) ( int[] a = {99, 22, 11, 3, 11, 55, 44, 88, 2, -3 }; int result = 0; for (int i=0; i<a.length; i++) { if (a[i]> 30) result += a[i]; } // end for System.out.printf( "Result is: %d\n", result); }//end main } // end class Test The output of this Java program will be: a. Result is: 280, b. Result is: 154. c. Result is: 286. d. Result is: 332. 9. Which of the following is not an algorithm? a. A recipe. b. Operating instructions. c. Textbook index. d. Shampoo instructions (lather, rinse, repeat). 10. Which of the following is true? a. Pseudocode is used to describe an algorithm. b. Pseudocode is translatable by the programmer into a programming language (like Java). c. Pseudocode is used to describe executable statements that will eventually be translated by the programmer into a program. d. All of the above
Expert Answer:
Answer rating: 100% (QA)
2 Prepare the adjusting journal entries include explanations a Bad debt expense is estimated to be 2... View the full answer
Related Book For
Introduction to Java Programming, Comprehensive Version
ISBN: 978-0133761313
10th Edition
Authors: Y. Daniel Liang
Posted Date:
Students also viewed these computer network questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Using priority queues to implement a loan approval system for a financial institute that funds startups. Problem: Our financial institute receives many loan applications and rejects them only if the...
-
A researcher wanted to find out if there was difference between older movie goers and younger movie goers with respect to their estimates of a successful actors income. The researcher first...
-
Label the following as True, False, or Uncertain and explain your choice. (Uncertain means that it can be either true or false depending upon the circumstances.) a. All members of a resource cartel...
-
What is the relationship between the balance of payments and a fixed or floating exchange rate regime?
-
The top of a rectangular table measures 1.245 m by 0.760 m. (a) The smallest division on the scale of the measurement instrument is (1) m, (2) cm, (3) mm. Why? (b) What is the area of the tabletop?
-
Use the figure shown to find the weight of the given spanning tree. 13 3 S 1 2 4 6 t V 14 15 2 11 8 5 W 9 x y 10
-
The following transactions relate to Academy Towing Service. Assume the transactions for the purchase of the wrecker and any capital improvements occur on January 1 of each year. 2016 1. Acquired...
-
6. [l2.85 Points] DETAILS SPRECALC7 3.6.019. MY NOTES ASK YOUR TEACHER Use transformations of the graph of y = 1/x to graph the rational function, as in Example 2. X+5 r(X) = x+6 O 0 State the domain...
-
Again, if only group classes were offered, assuming that all of the costs associated with the running of group classes (including teachers' wages) are fixed costs, and using the maximum rent, average...
-
Q4. The following parts are not related PART (1) - Consider two linear functions as shown below. Let a
-
Three years ago Cody bought a special oven for his small restaurant. At the time he paid $8,000 for it and the accountant told him to depreciate it straight line over five years. Now there is a new...
-
Mehta Ltd introduced 5000 units in a process at a cost of Rs10000.The wages and overheads incurred are Rs 10000 and Rs8000 respectively. It is expected that 10% of the output is likely to be...
-
Examine how NoSQL databases be used in APP development. ?
-
Identify a barrier to employee engagement within an organisation that would also be common to other organisations and explain how it affects employee engagement. The write up must be clear in...
-
Jawson Company uses the weighted-average method in its process costing system. Operating data for the Painting Department for the month of April appear below: What were the equivalent units of...
-
11 more than p raised to the 3rd power 3P+11 the product of 3 and the sum of r and 20 14. the product of 14 and g squared 14 92 twice the result of n decreased by 10 16. 4 less than c raised to the...
-
a. What is meant by the term tax haven? b. What are the desired characteristics for a country if it expects to be used as a tax haven? c. What are the advantages leading an MNE to use a tax haven...
-
Write a program that prompts the user to enter two points (x1, y1) and (x2, y2) and displays their distance between them. The formula for computing the distance is (x 2 - x 1 ) 2 + (y 2 - y 1 ) 2 ....
-
Rewrite Listing 21.7 CountKeywords. java to read in a Java source code file and count the occurrence of each keyword in the file, but don?t count the keyword if it is in a comment or in a string...
-
Write a program that uses the files described in Programming Exercise 12.31 and displays a ranking summary table for the first five girl?s and boy?s names as follows: The popularity ranking of baby...
-
Which of the following affects the present value of an investment? a. the interest rate b. the number of time periods (length of the investment) c. the type of investment (annuity versus single lump...
-
Order the capital budgeting process (Learning Objective 1) Place the following activities in sequence to illustrate the capital budgeting process: a. Budget capital investments b. Project...
-
Compute payback period-equal cash inflows (Learning Objective 2)} Refer to the Allegra Data Set. Calculate the CD-player project's payback period. If the CD project had a residual value of \(\$...
Study smarter with the SolutionInn App