Computer Science, asked by radhajajimoggala99, 2 months ago

40 of 60
What is the output of the following program -
public class testinor
{
public static void main(String args()
{
int i = 0;
i = i++ + 1;
System.out.println("1 = " +i);
}
}​

Answers

Answered by BrainlyProgrammer
2

Answer:

Given códe:

public class testinor{

public static void main(String args(){

int i = 0;

i = i++ + 1;

System.out.println("1 = " +i);

}

}

To find:-

  • output

Solution:-

 \texttt{initially, i = 0} \\  \texttt{i = i++  + 1 } \\ \texttt{  >>i = 0 + 1 } \\ \tt{    \underline{\boxed{\bold{>>  i = 1}}}}

Similar questions