Sergiu Dobozi wrote:So addActionListener really in fact is taking just a reference to an object of the class it is in as a parameter.
Ioanna Katsanou wrote:
Stephan van Hulst wrote:That's because in Java, operator precedence does not determine order of evaluation. Order of evaluation is always left to right.
Java will evaluate the a on the left of the addition operator before it evaluates the assignment expression on the right of the addition operator. Here are the steps that are performed:
Yes but my question is the following:
why in the bellow case it would first evaluate the parenthesis, and in the above case not?
What is the difference in this scenario???
Ioanna Katsanou wrote:
Stephan van Hulst wrote:That's because in Java, operator precedence does not determine order of evaluation. Order of evaluation is always left to right.
Java will evaluate the a on the left of the addition operator before it evaluates the assignment expression on the right of the addition operator. Here are the steps that are performed:
Yes but my question is the following:
why in the bellow case it would first evaluate the parenthesis, and in the above case not?
What is the difference in this scenario???
Junilu Lacar wrote:Then read Chapter 2 on Names to see why I and O are horrible names.
Ole Sandum wrote:
Was this the one in London, by any chance?
Jeanne Boyarsky wrote:In the real world, you are correct. In the simplified world of the exam, the singleton is shared more broadly. On the bright side, the real exam tells you how many answers are correct. If it said "choose three", I bet you'd have included F!
Suhaas Mohandos wrote:1. So if I use new in the called method, the change will not be reflected in the calling method?
Suhaas Mohandos wrote:2. If you are saying primitives are pass by value and objects are also passed by value in java then give me a fresh example of both(primitive and object) where the change is not reflected in the calling method?
Suhaas Mohandos wrote:3. When they say java is pass by value does it mean that changes made in the called method will not affect the calling method?
Jesper de Jong wrote:That has to do with generics, specifically with wildcards.
This is sometimes useful, but it's also a little more advanced and confusing to understand. One very common problem is that people think a Set<?> is a set that can contain any kind of object, but that's not the case; it's a Set that contains objects of one specific type, but what that type is, is unknown. This is sometimes useful if the method that works on the Set for example doesn't care or need to know what exactly the type of the objects in the Set is.