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 46 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
:D TYSM


tanna.moeller

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

 

Did you know?

The word drug comes from the Dutch word droog (meaning "dry"). For centuries, most drugs came from dried plants, hence the name.

Did you know?

Signs and symptoms of a drug overdose include losing consciousness, fever or sweating, breathing problems, abnormal pulse, and changes in skin color.

Did you know?

The term pharmacology is derived from the Greek words pharmakon("claim, medicine, poison, or remedy") and logos ("study").

Did you know?

There used to be a metric calendar, as well as metric clocks. The metric calendar, or "French Republican Calendar" divided the year into 12 months, but each month was divided into three 10-day weeks. Each day had 10 decimal hours. Each hour had 100 decimal minutes. Due to lack of popularity, the metric clocks and calendars were ended in 1795, three years after they had been first marketed.

Did you know?

There are actually 60 minerals, 16 vitamins, 12 essential amino acids, and three essential fatty acids that your body needs every day.

For a complete list of videos, visit our video library