This topic contains a solution. Click here to go to the answer

Author Question: What is the printout of the following code:double x = 10.1;int y = (int)x;System.out.println("x is " ... (Read 32 times)

fbq8i

  • Hero Member
  • *****
  • Posts: 527

Question 1

If a program compiles fine, but it terminates abnormally at runtime, then the program suffers ________.
◦ a logic error
◦ a syntax error
◦ a runtime error

Question 2

What is the printout of the following code:

double x = 10.1;
int y = (int)x;
System.out.println("x is " + x + " and y is " + y);

◦ x is 10.1 and y is 10.0
◦ x is 10.0 and y is 10.0
◦ x is 11 and y is 11
◦ x is 10.1 and y is 10
◦ x is 10 and y is 10


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by fbq8i on May 6, 2020

TheDev123

  • Sr. Member
  • ****
  • Posts: 332
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




fbq8i

  • Member
  • Posts: 527
Reply 2 on: May 6, 2020
Excellent


pangili4

  • Member
  • Posts: 346
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

The highest suicide rate in the United States is among people ages 65 years and older. Almost 15% of people in this age group commit suicide every year.

Did you know?

Calcitonin is a naturally occurring hormone. In women who are at least 5 years beyond menopause, it slows bone loss and increases spinal bone density.

Did you know?

Pink eye is a term that refers to conjunctivitis, which is inflammation of the thin, clear membrane (conjunctiva) over the white part of the eye (sclera). It may be triggered by a virus, bacteria, or foreign body in the eye. Antibiotic eye drops alleviate bacterial conjunctivitis, and antihistamine allergy pills or eye drops help control allergic conjunctivitis symptoms.

Did you know?

Cucumber slices relieve headaches by tightening blood vessels, reducing blood flow to the area, and relieving pressure.

Did you know?

The use of salicylates dates back 2,500 years to Hippocrates’s recommendation of willow bark (from which a salicylate is derived) as an aid to the pains of childbirth. However, overdosage of salicylates can harm body fluids, electrolytes, the CNS, the GI tract, the ears, the lungs, the blood, the liver, and the kidneys and cause coma or death.

For a complete list of videos, visit our video library