What is Call By Value & Call By Reference In Java - Core Java - Part -12

preview_player
Показать описание
Java Basics Part 12 - Difference Between CallByVal And CallByRef In Java

Learn:

pass by value and pass by reference in java with simple example
what is call by value and call by reference in c
why call by reference is not supported in java
difference between pass by value and pass by reference in java
definition of call by value and call by reference in java
difference between call by value and call by reference in java in tabular form
call by value and call by reference in java tutorials point

=======================================
Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

-~-~~-~~~-~~-~-
========================================================
Please watch: "Selenium & Automation Interview Preparation - By Naveen AutomationLabs"
-~-~~-~~~-~~-~- Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Paid courses (Recorded) videos:
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
-------------------------------

✔️SOCIAL NETWORKS
--------------------------------

Support My Channel✔️Or Buy Me A Coffee
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة
Рекомендации по теме
Комментарии
Автор

The way you explain conceptual topics, you are making newB's life better. thanks indeed.

razasyed
Автор

CallByVal And CallByRef -studied online but coudn't understand . After seeing your video cleared by doubts . Thanks Naveen . great info

satya
Автор

So wonderfully Explained Sir..Thank you 👍

jinalshah
Автор

Very well explained sir... Thank you !!

nageshbakre
Автор

Java does manipulate objects by reference, and all object variables are references. However, Java doesn't pass method arguments by reference; it passes them by value.

Sreelekshmii
Автор

Hi Naveen, Excellent work and explanation. Thank you so much for your time and effort ... All the core Java concepts you've cleared so far in the best way possible. Thanks again..

Ajit-kdoi
Автор

Hello Naveen, thank you so much for the efforts that u have in teaching us, I feel u r teaching better than institute,

rohinikannan
Автор

hi Naveen, can you please share an example in an application where call be reference is being used.

अनंतB
Автор

Hi Naveen
Ur teaching makes subject simple thanks for ur efforts
Can you give and example where do we use callby value and call by ref in Selenium..
Thanks in advance

madhurinaidu
Автор

Hi Naveen,
I can swap two number with following :
package ClassPackage;

public class Callbyreference {
int p;
int q;


public static void main(String[] args) {
// TODO Auto-generated method stub
Callbyreference obj = new Callbyreference();

obj.p = 50;
obj.q = 60;
obj.swap();
System.out.println(obj.p);
System.out.println(obj.q);



}
public void swap() {
int temp;
temp = p;
p = q;
q = temp;
}
Then what is the use of class variable in method public void swap(Callerreference t) and why do we pass obj in called method i.e. obj.swap(obj)? as swap is possible without using class variable

kunalgehlot
Автор

Very nice and simple explanation. Easy to remember and apply. Thank you very much for sharing your knowledge.

shivalingneralagi
Автор

Hi Naveen. Could you please tell me what is the name of application you're using to create diagrams in mac

amitasn
Автор

Where do we use this concept in selenium, please follow up

sehbdusa
Автор

Naveen some of the videos showing that java doesn’t support call reference. But you are saying it is possible. Please clarify me which is correct?

sameulsmock
Автор

Hi Naveen, Thanks for such knowledge full videos but I have a query on CallByRef, as you have shown that this is possible with Global variable. So can you also let me know how to do CallByRef using function/local variables?

JayKumar
Автор

What is the default behavior of Java, is it Call by Value or Call by Reference?

umeshchandra
Автор

instead of t, if i use obj itself, it still works. am i doing it right?

ramakrishnants
Автор

Oooh, that means if you call by reference, that means you put the whole object into a method; then inside the method, you can manipulate the variables inside the object.
Kind of paradox. Like a chameleon, where the object keep on changing clothes.

thiery
Автор

Hi naveen i am getting error as " obj cannot be resolved or is not a field"
Could you please suggest how to fix it.

shikhaverma