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

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

karlynnae

  • Hero Member
  • *****
  • Posts: 599
What is the printout for the first 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);
}
}

◦ i + j is 23
◦ i + j is 22
◦ i + j is 6
◦ i + j is 5


Related Topics

Need homework help now?

Ask unlimited questions for free

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

micaelaswann

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




karlynnae

  • Member
  • Posts: 599
Reply 2 on: May 6, 2020
:D TYSM


Missbam101

  • Member
  • Posts: 341
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Alzheimer's disease affects only about 10% of people older than 65 years of age. Most forms of decreased mental function and dementia are caused by disuse (letting the mind get lazy).

Did you know?

After 5 years of being diagnosed with rheumatoid arthritis, one every three patients will no longer be able to work.

Did you know?

According to research, pregnant women tend to eat more if carrying a baby boy. Male fetuses may secrete a chemical that stimulates their mothers to step up her energy intake.

Did you know?

Many people have small pouches in their colons that bulge outward through weak spots. Each pouch is called a diverticulum. About 10% of Americans older than age 40 years have diverticulosis, which, when the pouches become infected or inflamed, is called diverticulitis. The main cause of diverticular disease is a low-fiber diet.

Did you know?

ACTH levels are normally highest in the early morning (between 6 and 8 A.M.) and lowest in the evening (between 6 and 11 P.M.). Therefore, a doctor who suspects abnormal levels looks for low ACTH in the morning and high ACTH in the evening.

For a complete list of videos, visit our video library