Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

explain this ...please  RSS feed

 
aman hindustani
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello to all...please explain this..why y,z is printing zero..


public class justSimple
{
public static void main(String[] args)
{
System.out.println("Hello World!");
int x =0;
int y =0;
int z = 0;
y = y++;
z = y;
System.out.println("the value of x is "+x);
System.out.println("the value of y is "+y); // 0
System.out.println("the value of z is "+z); // 0
}
}
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!