This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes explain this ...please Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "explain this ...please" Watch "explain this ...please" New topic
Author

explain this ...please

aman hindustani
Ranch Hand

Joined: Jun 15, 2006
Posts: 57
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
}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: explain this ...please
 
Similar Threads
question about variables changed inside methods
how to compare the values in arrays
Question on labeled continue
Constructors--THIS() call
explain this ...please