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
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
Social Sciences,
4 months ago
Chemistry,
4 months ago
Chemistry,
8 months ago
Science,
1 year ago
Math,
1 year ago