9. Determine output of the following program public class Test{ public static void main(String args[]) {...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
9. Determine output of the following program public class Test{ public static void main(String args[]) { float f= (1/4) * 10; int i= Math.round (f); System.out.println (i); } 9. Determine output of the following program public class Test{ public static void main(String args[]) { float f= (1/4) * 10; int i= Math.round (f); System.out.println (i); }
Expert Answer:
Answer rating: 100% (QA)
The Java code snippet you provided is attempting to compute the value of a float variable f by divid... View the full answer
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Posted Date:
Students also viewed these programming questions
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Could you please help complete the following java code. Help is needed where //*** is throughout the code. import java.util.Arrays; import java.util.Random; import java.util.Scanner; // // Project 3...
-
Need help getting the solution to this java code. Need help where //*** is marked throughout the code. Thanks! import java.util.Arrays; import java.util.Random; import java.util.Scanner; public class...
-
An investor has $60,000 to invest in a $280,000 property. He can obtain either a $220,000 loan at 9.5 percent for 20 years or a $180,000 loan at 9 percent for 20 years and a second mortgage for...
-
A rancher plans to fence a rectangular pasture adjacent to a river (see figure). The rancher has 100 meters of fencing, and no fencing is needed along the river. (a) Write the area A of the pasture...
-
How can an organization maintain its image while dealing with a talent surplus? If layoffs are necessary, what would you recommend managers do to ensure that survivors remain committed and productive?
-
An electron moves in a straight line at a speed of \(6.0 \times 10^{7} \mathrm{~m} / \mathrm{s}\). Calculate the magnitude and direction of the magnetic field at a position \(5.0 \mathrm{~mm}\)...
-
The following transactions occurred in January at Dungan Cabinetry, a furniture maker that uses job costing: 1. Purchased $53,700 in materials on account. 2. Issued $1,500 in supplies from the...
-
14.An equi-concave lens of radius of curvature 15 cm and = 1.5 is placed in water (=1.33). If one surface is silvered, then image distance from lens when an object is placed at distance of 14 cm from...
-
Required - Please submit the following two documents: 1. Using Excel, submit the following: i. ii. Calculate Rashmika's minimum net income for tax purposes in accordance with the ordering provisions...
-
Suppose a monopolist faces a demand curve given by the equation P=200-2Q. Marginal cost is constant and given by the equation MC = 20. a. Using the information above, what is the monopolist's...
-
Design a one-way slab for the inside of a building using the span, loads, and other data given in the figure below. 11'-8" GIVEN SDL 10 psf (super imposed dead load not including the slab selfweight)...
-
Check out PISA and your textbook for data relating to the expenditures on education per country. There are different sectors of education that receive funding. Why are there differences in the amount...
-
1. Explain the Law of Diminishing Returns. To do that: a) Consider all pertinent variables to include in your analysis. b) Provide data and graphs to support your answer(s). 2. Discuss the nature of...
-
What is Adam Smith's invisible hand idea all about? Why is there a spontaneous order that comes out of the pricing system (according to Smith)? Why did Smith think that banking needed to regulated?...
-
Search/identify a current open solar contract. Contract name. Notice ID. Department/Agency. Subtier. Current Response Date Due. Office. A brief description of the contract. Avoid copying and pasting...
-
Assume interest rates in the US are at 1.5% per year, and interest rates in Israel are at 6% per year, and that the shekel is trading at 4 sheckels/dollar.a.If the two-year forward rate on sheckels...
-
Does log 81 (2401) = log 3 (7)? Verify the claim algebraically.
-
Modify the Sieve program developed in Section 11.1 to make two optimizations. First, instead of storing all integers up to the maximum in the numbers list, store only 2 and all odd numbers from 3...
-
Write a method called stripComments that accepts a Scanner representing an input file containing a Java program as its parameter, reads that file, and then prints the files text with all comments...
-
Consider the following method:
-
Refer to the latest financial report of JB Hi-Fi Limited on its website, www.jbhifi.com.au, and answer the following questions. 1. Is it likely that JB Hi-Fi Limited would have to confront such...
-
Imelda Instruments Ltd manufactures two products: missile range instruments and space pressure gauges. During January, 53 range instruments and 360 pressure gauges were produced, and overhead costs...
-
Swiss Chocolates Ltd produces blocks of chocolate. Raw materials in the form of cocoa solids, milk and sugar are added at the beginning of the process, flavouring, fruit and nuts are added half-way...
Study smarter with the SolutionInn App