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 50 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
Gracias!


cassie_ragen

  • Member
  • Posts: 347
Reply 3 on: Yesterday
Thanks for the timely response, appreciate it

 

Did you know?

Drying your hands with a paper towel will reduce the bacterial count on your hands by 45–60%.

Did you know?

Vampire bats have a natural anticoagulant in their saliva that permits continuous bleeding after they painlessly open a wound with their incisors. This capillary blood does not cause any significant blood loss to their victims.

Did you know?

Alzheimer's disease affects only about 10% of people older than 65 years of age. Most forms of decreased mental function and dementia are caused by disuse (letting the mind get lazy).

Did you know?

To maintain good kidney function, you should drink at least 3 quarts of water daily. Water dilutes urine and helps prevent concentrations of salts and minerals that can lead to kidney stone formation. Chronic dehydration is a major contributor to the development of kidney stones.

Did you know?

Though newer “smart” infusion pumps are increasingly becoming more sophisticated, they cannot prevent all programming and administration errors. Health care professionals that use smart infusion pumps must still practice the rights of medication administration and have other professionals double-check all high-risk infusions.

For a complete list of videos, visit our video library