Why is it important to understand the difference between reference types and primitive types in Java? -


I am following a list of problems in Java that can not be understood properly without understanding the difference

For example:

  • Passing the parameters of the statutes
  • What limitations have been imposed by using "last" on a variable manifesto
  • What == means

Anyone else?

Edit: This question does not seem to understand. The inspiration behind this is that my experience as a beginner Java learner was that for example:

  int i = 1;  

and

  set & lt; Thing & gt; Set = new set & lt; Thing & gt; ();  

was not clear now I know that once you pick up java, you can take it and you can not think about it but I will make it Keep in mind that beginners struggle, especially if they do not come from programming backgrounds. I think there is something that will often require addressing during Java education.

Edit: Feel free to stop is still not good.

I think the most important thing is not to understand the references in Java objects themselves but only An address (or indicator or whatever you want to call it) is important to understand the actual ozjetet itself in this way that you always have two things:

  1. context (which is stored in a variable)
  2. Object (which can not be stored in a variable - of Referenced by a reference)

If you understand this key concept, then things like == are quite easy to understand because now you know that you are just comparing references And not the object

In summary: Before learning how to use the object, before explaining the difference between an object and its context.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -