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

Author Question: What is the printout for the third statement in the main method?public class Foo { static int i = 0; ... (Read 38 times)

nelaaney

  • Hero Member
  • *****
  • Posts: 560
What is the printout for the third statement in the main method?

public class Foo {
static int i = 0;
static int j = 0;

public static void main(String[] args) {
int i = 2;
int k = 3;
{
int j = 3;
System.out.println("i + j is " + i + j);
}
k = i + j;
System.out.println("k is " + k);
System.out.println("j is " + j);
}
}

◦ j is 0
◦ j is 1
◦ j is 2
◦ j is 3


Related Topics

Need homework help now?

Ask unlimited questions for free

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

yotaSR5

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




nelaaney

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


emsimon14

  • Member
  • Posts: 344
Reply 3 on: Yesterday
:D TYSM

 

Did you know?

Lower drug doses for elderly patients should be used first, with titrations of the dose as tolerated to prevent unwanted drug-related pharmacodynamic effects.

Did you know?

According to animal studies, the typical American diet is damaging to the liver and may result in allergies, low energy, digestive problems, and a lack of ability to detoxify harmful substances.

Did you know?

It is important to read food labels and choose foods with low cholesterol and saturated trans fat. You should limit saturated fat to no higher than 6% of daily calories.

Did you know?

Atropine was named after the Greek goddess Atropos, the oldest and ugliest of the three sisters known as the Fates, who controlled the destiny of men.

Did you know?

Patients who cannot swallow may receive nutrition via a parenteral route—usually, a catheter is inserted through the chest into a large vein going into the heart.

For a complete list of videos, visit our video library