File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Assignment operator returns the value of assignment ?

 
Mahtab Alam
Ranch Hand
Posts: 391
1
Java MySQL Database PHP
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic