Java new Batch - Class 10- why call by value is possible in java and why not call by reference?

Опубликовано: 10 Декабрь 2024
на канале: Learn Java
194
9

You can learn Java with me as the Java Programming language is being made easily. It would take a period of minimum three months and maximum 6 months to master Java. I would recommend you to watch all my videos to crack any software interviews that would require Java Programming language as a primary skill.

20. Why java follows only call by value parameter passing mechanism
whereas C and C++ follows both call by value and call by reference passing mechanism ? why?

What is parameter passing mechanism in programming languages?
if any Programming language , if we pass Primitive data types as parameters in the methods, it is called as call by value parameter passing mechanism

ex : byte, short , int ,long, float, double, char, boolean

Please be informed that call by reference is not supported by java, in call by reference we need to pass addresses which are stored in the form of pointers. However, pointers concept is not there in java due to security reasons. Hence, java does not support call by reference parameter passing mechanism.


На этой странице сайта вы можете посмотреть видео онлайн Java new Batch - Class 10- why call by value is possible in java and why not call by reference? длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Learn Java 10 Декабрь 2024, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 194 раз и оно понравилось 9 зрителям. Приятного просмотра!