Reference is not a known side

zhaozj2021-02-16  45

Reference does not support Pointer, only Reference, is often quite confused, especially the information of the data structure, and the first thing in their heart is: "There is no Pointer, how to become Don't do the data structure of Linked List and Tree? "Seeking that Reference is a smart Point Er, which has the advantage of Pointer, and does not use the programmer to write it to Reference (*) and Dereference (& Dereference) as Pointer. ), Will not cause Crash if it will misunderstand the internal resonance zone like Pointer. Because there are a lot, Reference is already an important necessary feature of modern program language. what! You said that the XX high-level language does not support Reference, then you can bury it in the history ash of the twentieth century. Java's processing method is: as long as it is a basic type (including Boolean, Byte, Short, Int, Long, Float, Double, Char), PASS BY VALUE is used, and other types will be passed by Refer Ence. But I found that this is possible in the future, because Java Language will bind ByValue to Reserved Word (non-Keyword). When Java turns BYVALUE to Keyword, the value of non-basic state can pass by value, but I believe that Java must also start supporting Copy Constructor as a supporting measures, after all, using Deep Copy or ShaLlow Copy (even DEEP And ShaLlow and ShaLLOW's COPY is still to make Programmer decide. Previously: As long as it is a basic state (including Boolean, Byte, Short, Int, Long, Float, Double, Char), Pass By Value, other types of PASS BY REFERENCE. What is Pass By Value? What is Pass by reference? For a few more, Pass by value is the information of "Bordering". Pass by Reference is the information of "this respect" passed. (Note: Since the news that happened this news, after the noun, "Duty" and "Division", I found that it is easy to explain the concept of Refere NCE to students. Because the object is a pass by reference, an object is often referred to simultaneously by multiple Variable.

转载请注明原文地址:https://www.9cbs.com/read-25746.html

New Post(0)