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

Author Question: To assign a double variable d to a float variable x, you write ________. (Read 20 times)

a0266361136

  • Hero Member
  • *****
  • Posts: 538

Question 1

What is y displayed?

public class Test {
public static void main(String[] args) {
int x = 1;
int y = x + x++;
System.out.println("y is " + y);
}
}

◦ y is 1.
◦ y is 2.
◦ y is 3.
◦ y is 4.

Question 2

To assign a double variable d to a float variable x, you write ________.
◦ x = (float)d;
◦ x = (long)d
◦ x = d;
◦ x = (int)d;


Related Topics

Need homework help now?

Ask unlimited questions for free

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

jgranad15

  • Sr. Member
  • ****
  • Posts: 345
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 29% of students answer this correctly




a0266361136

  • Member
  • Posts: 538
Reply 2 on: May 6, 2020
Gracias!


lcapri7

  • Member
  • Posts: 350
Reply 3 on: Yesterday
Wow, this really help

 

Did you know?

More than 4.4billion prescriptions were dispensed within the United States in 2016.

Did you know?

The human body produces and destroys 15 million blood cells every second.

Did you know?

The most destructive flu epidemic of all times in recorded history occurred in 1918, with approximately 20 million deaths worldwide.

Did you know?

Most strokes are caused when blood clots move to a blood vessel in the brain and block blood flow to that area. Thrombolytic therapy can be used to dissolve the clot quickly. If given within 3 hours of the first stroke symptoms, this therapy can help limit stroke damage and disability.

Did you know?

Nitroglycerin is used to alleviate various heart-related conditions, and it is also the chief component of dynamite (but mixed in a solid clay base to stabilize it).

For a complete list of videos, visit our video library