Find three run-time errors in the following program. public class Has Errors { } public static void
Question:
Find three run-time errors in the following program.
Transcribed Image Text:
public class Has Errors { } public static void main(String[] args) { } int x = 0; int y = 0; Scanner in new Scanner("System.in"); System.out.print("Please enter an integer: "); x = in. read Int (); System.out.print("Please enter another integer: "); x = in. read Int (); System.out.println("The sum is " + x + y);
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 50% (2 reviews)
Based on the image provided here are three runtime errors that could occur with the presented code 1 ...View the full answer
Answered By
Aysha Ali
my name is ayesha ali. i have done my matriculation in science topics with a+ . then i got admission in the field of computer science and technology in punjab college, lahore. i have passed my final examination of college with a+ also. after that, i got admission in the biggest university of pakistan which is university of the punjab. i am studying business and information technology in my university. i always stand first in my class. i am very brilliant client. my experts always appreciate my work. my projects are very popular in my university because i always complete my work with extreme devotion. i have a great knowledge about all major science topics. science topics always remain my favorite topics. i am also a home expert. i teach many clients at my home ranging from pre-school level to university level. my clients always show excellent result. i am expert in writing essays, reports, speeches, researches and all type of projects. i also have a vast knowledge about business, marketing, cost accounting and finance. i am also expert in making presentations on powerpoint and microsoft word. if you need any sort of help in any topic, please dont hesitate to consult with me. i will provide you the best work at a very reasonable price. i am quality oriented and i have 5 year experience in the following field.
matriculation in science topics; inter in computer science; bachelors in business and information technology
_embed src=http://www.clocklink.com/clocks/0018-orange.swf?timezone=usa_albany& width=200 height=200 wmode=transparent type=application/x-shockwave-flash_
4.40+
11+ Reviews
14+ Question Solved
Related Book For
Question Posted:
Students also viewed these Java Programming questions
-
re Regular Languages and Finite Automata (a) Let L be the set of all strings over the alphabet {a, b} that end in a and do not contain the substring bb. Describe a deterministic finite automaton...
-
ttth Suppose that the sequence of bags {Bn | n N} is recursively enumerated by the computable function e(n, x) = fn(x), [7 marks] Hence prove that the set of all recursive bags cannot be recursively...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
2. Consider two households, one with an income twice as large as the other. Both households pay the equivalent of 5% of their income to consume free (public) education to the quantity PS (where PS...
-
An absorption refrigeration system that receives heat from a source at 130C and maintains the refrigerated space at -5C is claimed to have a COP of 2. If the environment temperature is 27C, can this...
-
What implications can you see for managers and communication from this story?
-
How is obsolescence a cost of holding stock?
-
Gazarra Company is a very profitable small business. It has not, however, given much consideration to internal control. For example, in an attempt to keep clerical and office expenses to a minimum,...
-
arinja Company uses job order costing. The following data summarize the operations related to production for May: May 1 Materials purchased on account, $644,380. 2 Materials requisitioned, $670,250,...
-
Watch A Tale of One City, Braddock Rises From the Ashes or watch Renewal and Reality: Rebuilding Braddock(with CC) Answer the following questions about the video. Answer each question in ONE...
-
Consider the following code: Cash Register register = new Cash Register(); register.record Purchase(19.93); register. receive Payment (20, 0, 0, 0, 0); System.out.print("Change: ");...
-
Find at least five compile-time errors in the following program. public class HasErrors {
-
The surface area of a mammal, S, satisfies the equation S = KM 23 , where M is the body mass and the constant of proportionality k depends on the body shape of the mammal. A human of body mass 70...
-
In the circuit of Fig. 4-51 write two loop equations using I 1 and I 2 . Then find the currents and node voltages. A 3A ( 4 3 V 792 B +1 D w 392 12 C
-
The capacitor in the circuit shown in Fig. 7-37 has initial charge Q 0 = 800 C, with polarity as indicated. If the switch is closed at t = 0, obtain the current and charge, for t > 0. 100 V (+ 10 4 F
-
A gift shop sells 400 boxes of scented candles a year. The ordering cost is \($60\) for scented candles, and holding cost is \($24\) per box per year. What is the economic order size for scented...
-
Kay Vickery is angry with Gene Libby. He is behind schedule developing supporting material for tomorrows capital budget committee meeting. When she approached him about his apparent lackadaisical...
-
Tharpe Painting Company is considering whether to purchase a new spray paint machine that costs \($3,000\) . The machine is expected to save labor, increasing net income by \($450\) per year. The...
-
Reconsider Prob. 5-100. Using EES (or other) software, investigate the effect of the moving velocity of the steel plate on the rate of heat transfer from the oil bath. Let the velocity vary from 5 to...
-
Element compound homogeneous mixture (heterogeneous mixture) 4) A piece of gold has a mass of 49.75 g. What should the volume be if it is pure gold? Gold has a density of 19.3 g/cm (3 points) D=m/v...
-
Consider a TCP connection between Host A and Host B. Suppose that the TCP segments traveling from Host A to Host B have source port number x and destination port number y. What are the source and...
-
Referring to Figure 2.4, we see that none of the applications listed in Figure 2.4 requires both no data loss and timing. Can you conceive of an application that requires no data loss and that is...
-
SMS, iMessage. and WhatsApp are ail smartphone real-time messaging systems. After doing some research on the Internet, for each of these systems write one paragraph about the protocols they use. Then...
-
Determine the simple interest earned on $10,000 after 10 years if the APR is 15%
-
give me an example of 10 transactions from daily routine that we buy and put for me Liabilities + Owners' Equity + Revenues - Expenses
-
What is the Macaulay duration of a bond with a coupon of 6.6 percent, seven years to maturity, and a current price of $1,069.40? What is the modified duration? (Do not round intermediate...
Study smarter with the SolutionInn App