Thanks Kevin for the links.
Type: Posts; User: ha.minh.nam
Thanks Kevin for the links.
Thanks Kevin for reminding me about this fundamental stuff.
Actually everything is passed by value. The value here is memory address of the variable right?
Please correct me if I am wrong.
...
Yes, that's fine.
immutable objects
Yes, primitive variables are passed as copies, unlike object references. It is not about wrong or right, it is a bad practice and should be avoided.
SURE.
No one prevents you from passing...
It does not matter either constructor or normal method. Doing so means you pass an object but not use it (you assign the passing object reference to another object).
Your class extends Frame...
Don't you believe the author?
Your code snippet:
import java.awt.*;
public class myWindow extends Frame{
Frame pencere = new Frame();