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

Author Question: What is y displayed in the following code?public class Test { public static void main(String[] args) ... (Read 70 times)

Coya19@aol.com

  • Hero Member
  • *****
  • Posts: 601

Question 1

What is i printed in the following code?

public class Test {
public static void main(String[] args) {
int j = 0;
int i = j++ + j * 5;
System.out.println("What is i? " + i);
}
}

◦ 5
◦ 1
◦ 0
◦ 6

Question 2

What is y displayed in the following code?

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.


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by Coya19@aol.com on May 6, 2020

jasonq

  • Sr. Member
  • ****
  • Posts: 335
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




Coya19@aol.com

  • Member
  • Posts: 601
Reply 2 on: May 6, 2020
YES! Correct, THANKS for helping me on my review


phuda

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

 

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).

Did you know?

For about 100 years, scientists thought that peptic ulcers were caused by stress, spicy food, and alcohol. Later, researchers added stomach acid to the list of causes and began treating ulcers with antacids. Now it is known that peptic ulcers are predominantly caused by Helicobacter pylori, a spiral-shaped bacterium that normally exist in the stomach.

Did you know?

Fewer than 10% of babies are born on their exact due dates, 50% are born within 1 week of the due date, and 90% are born within 2 weeks of the date.

Did you know?

Every flu season is different, and even healthy people can get extremely sick from the flu, as well as spread it to others. The flu season can begin as early as October and last as late as May. Every person over six months of age should get an annual flu vaccine. The vaccine cannot cause you to get influenza, but in some seasons, may not be completely able to prevent you from acquiring influenza due to changes in causative viruses. The viruses in the flu shot are killed—there is no way they can give you the flu. Minor side effects include soreness, redness, or swelling where the shot was given. It is possible to develop a slight fever, and body aches, but these are simply signs that the body is responding to the vaccine and making itself ready to fight off the influenza virus should you come in contact with it.

Did you know?

Computer programs are available that crosscheck a new drug's possible trade name with all other trade names currently available. These programs detect dangerous similarities between names and alert the manufacturer of the drug.

For a complete list of videos, visit our video library