Computer Science, asked by batraananya, 8 months ago

Determine the output of the following program.
public class PredictOutput1
public static void main(String args[])
{
int a = 4, b = 2, c = 3;
System.out.println("Output 1:" + (a = b * c));
System.out.println("Output 2:" + (a = (b + c));
}
}​

Answers

Answered by SujaSri
2

Answer:

public class PredictOutput1

{

public static void main(String args[])

{

int a = 4, b = 2, c = 3;

System.out.println("Output 1:" + (a = b * c));

System.out.println("Output 2:" + (a = (b + c)));

}

}

Output:

Output 1 :6

Output 2:5

Pls check for the paranthesis.. line 2 and line 7.

Similar questions