The following program contains 9 mistakes! What are they? public class Oops2 { 2. public static void
Question:
The following program contains 9 mistakes! What are they?
Transcribed Image Text:
public class Oops2 { 2. public static void main (String [] args) { 3 int x; 4 System.out.println ("x is" x); int x = 15.2; // set x to 15.2 %3D 7 System.out.println ("x is now + x"); 8 9. int y; // set y to 1 more than x 10 y = int x + 1; 11 System.out.println ("x and y are "+ x + and + y); 12 13 }
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 25% (4 reviews)
Mistakes in Oops2 program 1 line 4 There should be a between is and x 2 line 4 V...View the full answer
Answered By
Akash Kumar
I am cracked neet 2020 with air 678 and want to solve doubt of my junior doctors.i have also got 96 percent in 10 board exam and in my 12 th board exam I got 97.5 percent. With 100 in physics 100 in computer 98 in chemistry and 91 in biology.in my neet 2020 I have got 160 in physics out of 180 and in chemistry 165 out of 180 and 335 in my biology .
0.00
0 Reviews
10+ Question Solved
Related Book For
Building Java Programs A Back To Basics Approach
ISBN: 9780135471944
5th Edition
Authors: Stuart Reges, Marty Stepp
Question Posted:
Students also viewed these Computer science questions
-
The following program contains 7 mistakes! What are they? What output is produced for each of the following calls? a. IfElseMystery1(3, 20); b. IfElseMystery1(4, 5); c. IfElseMystery1(5, 5); d....
-
The following program contains at least 10 syntax errors. What are they?
-
What kind of mistakes might ES make and why? Why is it easier to correct mistakes in ES than in conventional computer programs?
-
Which of the following statements is correct regarding a work sheet and the adjustment process? Adjusting journal entries are prepared from the Adjusted Trial Balance columns. Adjusting journal...
-
Consider an aircraft powered by a turbojet engine that has a pressure ratio of 9. The aircraft is stationary on the ground, held in position by its brakes. The ambient air is at 7C and 95 kPa and...
-
A $5000, 4.5% bond with interest payable semi-annually is redeemable at par in 12 years. What is the purchase price to yield (a) 3% compounded semi-annually? (b) 5% compounded semi-annually?
-
Which is not a mechanical property of a material? (a) Hardness (b) Yield strength (c) Poisson's ratio (d) Endurance limit
-
Indicate whether the following statements are true or false. If the statement is false, explain why. a. If a firm repurchases its stock in the open market, the shareholders who tender the stock are...
-
Respond to the following with why/why not you agree or disagree with the below statement. Even when a case seems cut and dry, every case deserves a trial. In our country, we are "innocent until...
-
The observed baseline vector components in meters between two control stations are (3814.244, 470.348, 1593.650). The geocentric coordinates of the control stations are (1,162,247.650, 4,655,656.054,...
-
Modify your code from the previous exercise so that it could easily be modified to display a different range of numbers (instead of 1234567890 ) and a different number of repetitions of those numbers...
-
Suppose you have an int variable called number . What Java expression produces the last digit of the number (the 1s place)?
-
Prove Theorem 3.9(b). b. If A is an invertible matrix and c is a nonzero scalar, then cA is an invertible matrix and 1 (CA)1 = -A-1
-
Derived demand is the demand for _________. a) final goods and services b) resources c) final goods as well as services and resources d) neither final goods and services nor resources.
-
When the demand for wheat rises, the demand for farm labor ________. a) rises b) falls c) may rise or fall
-
What is the difficulty in applying Gauss elimination to the following linear algebraic equations? \[ \begin{aligned} -5 x_{1}+5 x_{2} & =5 \\ 10 x_{1}-10 x_{2} & =-5 \end{aligned} \]
-
Automation will raise the level of employment if the _________. a) output effect is equal to the substitution effect b) output effect is greater than the substitution effect c) substitution effect is...
-
If Melissa produces twice as much per hour as Adam, we would say that she is ______________ as productive as he is.
-
When a converging lens is used in a camera (as in Figure 26.26b), the film must be at a distance of 0.210 m from the lens to record an image of an object that is 4.00 m from the lens. The same lens...
-
For the data in Exercise 17-19, use the FIFO method to summarize total costs to account for, and assign these costs to units completed and transferred out, and to units in ending work in process....
-
When processor designers consider a possible improvement to the processor datapath, the decision usually depends on the cost/performance trade-off . In the following three problems, assume that we...
-
Problems in this exercise assume that logic blocks needed to implement a processors datapath have the following latencies: 1. If the only thing we need to do in a processor is fetch consecutive...
-
For the problems in this exercise, assume that there are no pipeline stalls and that the breakdown of executed instructions is as follows: 1. In what fraction of all cycles is the data memory used?...
-
Provide the codification references to support your answers Scope Questions 1. Which entities are subject to the Interim Reporting guidance within the Codification? 2. Does the Foreign Currency...
-
Why should a company establish an internal control structure? (2 marks) Evaluate the advantages and disadvantages of Perpetual Inventory System against Periodical Inventory System respectively. (2...
-
The Green Chef is an exclusive restaurant in your city. Reservations are difficult to secure and the menu is expensive. The owner, Chef Jorge, is rumored to be running an illegal gambling operation...
Study smarter with the SolutionInn App