This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Assignment operator returns the value of assignment ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Assignment operator returns the value of assignment ?" Watch "Assignment operator returns the value of assignment ?" New topic
Author

Assignment operator returns the value of assignment ?

Mahtab Alam
Ranch Hand

Joined: Mar 28, 2012
Posts: 178

class RTW
{
public static void main(String args[])
{ int x=10;
char c='a';
String s="ABC";
System.out.println(x=20); //20
System.out.println(c='b'); //b
System.out.println(s+="ST"); //ABCST
}
}

Does this mean assignment operator returns the result of assignment.

And is it required for ocjp6 exam to know the precedence of some operators


Mahtab Alam (OCJP )
Blogs : alamsql.blogspot.in , alammahtab.blogspot.in
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assignment operator returns the value of assignment ?
 
Similar Threads
Dynamic Binding
String + operator doubt?
Doubt in Sun's 1.4 Practice xam
javaprogramming
Confused