Double equals (Not equality) during assigning Java

Posted by FabianCook on Programmers See other posts from Programmers or by FabianCook
Published on 2013-10-28T03:05:42Z Indexed on 2013/10/28 4:03 UTC
Read the original article Hit count: 128

Filed under:

When I tried searching this I would just get things on equality.

When I was reading through some documentation for navigation in Android I had come across something I had never seen before. I came across this:

mTitle = mDrawerTitle = getTitle();

It almost looks like something you can do in JavaScript where you can take the first not-null variable and assign it to a variable.

In JavaScript I would do this:

mTitle = mDrawerTitle || getTitle();

And it would return the first not null, in Java, is this double equals usage the equivalent in Java?

What is this type of expression called?

© Programmers or respective owner

Related posts about java