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 23 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!


bigsis44

  • Member
  • Posts: 317
Reply 3 on: Yesterday
Excellent

 

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?

About 60% of newborn infants in the United States are jaundiced; that is, they look yellow. Kernicterus is a form of brain damage caused by excessive jaundice. When babies begin to be affected by excessive jaundice and begin to have brain damage, they become excessively lethargic.

Did you know?

Ether was used widely for surgeries but became less popular because of its flammability and its tendency to cause vomiting. In England, it was quickly replaced by chloroform, but this agent caused many deaths and lost popularity.

Did you know?

To combat osteoporosis, changes in lifestyle and diet are recommended. At-risk patients should include 1,200 to 1,500 mg of calcium daily either via dietary means or with supplements.

Did you know?

Human kidneys will clean about 1 million gallons of blood in an average lifetime.

For a complete list of videos, visit our video library