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 22 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
YES! Correct, THANKS for helping me on my review


isabelt_18

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

 

Did you know?

Congestive heart failure is a serious disorder that carries a reduced life expectancy. Heart failure is usually a chronic illness, and it may worsen with infection or other physical stressors.

Did you know?

In 1885, the Lloyd Manufacturing Company of Albany, New York, promoted and sold "Cocaine Toothache Drops" at 15 cents per bottle! In 1914, the Harrison Narcotic Act brought the sale and distribution of this drug under federal control.

Did you know?

Thyroid conditions may make getting pregnant impossible.

Did you know?

A seasonal flu vaccine is the best way to reduce the chances you will get seasonal influenza and spread it to others.

Did you know?

If you use artificial sweeteners, such as cyclamates, your eyes may be more sensitive to light. Other factors that will make your eyes more sensitive to light include use of antibiotics, oral contraceptives, hypertension medications, diuretics, and antidiabetic medications.

For a complete list of videos, visit our video library