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

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ต.ค. 2024
  • 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:
    www.youtube.co...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    ~-~~-~~~-~~-~
    Follow my Site/Blog: www.naveenautom...
    ========================================================
    Please watch: "Selenium & Automation Interview Preparation - By Naveen AutomationLabs"
    • Selenium & Automation ...
    ~-~~-~~~-~~-~ Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
    www.youtube.co...
    Follow me on my Facebook Page:
    / naveenqtpexpert
    Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
    t.me/joinchat/...
    Paid courses (Recorded) videos:
    Java & Selenium Course: www.naveenautom...
    API Course: www.naveenautom... ➡️Get Our Courses✔️
    📗 Get My Paid Courses at
    Paid courses (Recorded) videos:
    Java & Selenium Course: www.naveenautom...
    API Course: www.naveenautom...
    -------------------------------
    ✔️SOCIAL NETWORKS
    Facebook: / naveenqtpexpert
    Twitter: / naveenkhunteta
    Blog: www.naveenautom...
    --------------------------------
    Support My Channel✔️Or Buy Me A Coffee
    Paypal: paypal.me/nave...
    Google Pay: naveenanimation20@gmail.com
    --------------------------------
    ✔️Thanks for watching!
    देखने के लिए धन्यवाद
    Благодаря за гледането
    感谢您观看
    Merci d'avoir regardé
    Grazie per la visione
    Gracias por ver
    شكرا للمشاهدة

ความคิดเห็น • 30

  • @razasyed9771
    @razasyed9771 6 ปีที่แล้ว +11

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

  • @amitasn1
    @amitasn1 ปีที่แล้ว +2

    Thanks naveen for simple explanation😀

  • @kunalgehlot6062
    @kunalgehlot6062 4 ปีที่แล้ว +3

    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

  • @satya5566
    @satya5566 7 ปีที่แล้ว +5

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

  • @amitasn1
    @amitasn1 ปีที่แล้ว

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

  • @अनंतB
    @अनंतB 3 ปีที่แล้ว +2

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

  • @Sreelekshmii
    @Sreelekshmii 5 ปีที่แล้ว +3

    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.

  • @sameulsmock4521
    @sameulsmock4521 3 ปีที่แล้ว

    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?

  • @rohinikannan1
    @rohinikannan1 6 ปีที่แล้ว +2

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

  • @sehbdusa
    @sehbdusa 6 ปีที่แล้ว +6

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

  • @Ajit-kd9oi
    @Ajit-kd9oi 6 ปีที่แล้ว +3

    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..

  • @madhurinaidu3564
    @madhurinaidu3564 3 ปีที่แล้ว

    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

  • @JayKumar1046
    @JayKumar1046 5 ปีที่แล้ว +2

    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?

  • @jinalshah7023
    @jinalshah7023 3 ปีที่แล้ว

    So wonderfully Explained Sir..Thank you 👍

  • @nageshbakre7454
    @nageshbakre7454 3 ปีที่แล้ว

    Very well explained sir... Thank you !!

  • @shivalingneralagi8522
    @shivalingneralagi8522 4 ปีที่แล้ว

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

  • @m.smanoj4688
    @m.smanoj4688 2 ปีที่แล้ว

    The most underrated channel ☹️

  • @ankitasingh-gi3yq
    @ankitasingh-gi3yq 4 ปีที่แล้ว +1

    Thanku for this nice concept

  • @umeshchandra55555
    @umeshchandra55555 3 ปีที่แล้ว

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

  • @prashanawali1525
    @prashanawali1525 5 ปีที่แล้ว

    Thanks a lot Naveen.

  • @ramakrishnants7826
    @ramakrishnants7826 4 ปีที่แล้ว

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

    • @kishorekumar2769
      @kishorekumar2769 4 ปีที่แล้ว

      yes right, you can put your name as well because that is like variable name.

  • @devjewel8345
    @devjewel8345 5 ปีที่แล้ว +1

    Great!!

  • @shikhaverma8876
    @shikhaverma8876 6 ปีที่แล้ว

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

  • @thiery572
    @thiery572 6 ปีที่แล้ว

    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.

  • @nitinyadav-ul3ve
    @nitinyadav-ul3ve 4 ปีที่แล้ว +2

    Confused for the first time