How System.out.println() Works Internally in Java? || Java Interview Question || Naveen

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2024

Комментарии • 77

  • @saravanankaliyamoorthy9479
    @saravanankaliyamoorthy9479 3 года назад +5

    This is the first time I'm seeing JNI related details. Really useful. Thanks brother

  • @skamirullah
    @skamirullah 3 года назад +7

    Never thought about it in-depth. Thank you so much Naveen for the detailed explanation. Kudos to your efforts and unique content.

  • @bhagbatinayak8296
    @bhagbatinayak8296 2 года назад +1

    I was searching for this answer from a long time and finally got the clarity. Thank you so much Naveen.

  • @intrestingfacts6785
    @intrestingfacts6785 3 года назад +4

    Your channel is my daily routine... I learn something new everyday. Thanks for nice explanation

  • @dystopianNinja1289
    @dystopianNinja1289 3 года назад +2

    This is so deep and insightful! Thank you so much

  • @rockyrajeshyt6658
    @rockyrajeshyt6658 3 года назад +2

    Always interesting things comes from your channel sir thank you Naveen sir

  • @kalavaidya
    @kalavaidya 3 года назад +1

    Awesome! Very useful to know. Such detailed explanation are found nowhere else. Thank you so much.

  • @munich-germanylife8207
    @munich-germanylife8207 3 года назад +1

    Cleared with all my doubt , Thanks

  • @mustapharaimilawal8053
    @mustapharaimilawal8053 2 года назад

    Thank you for making this in-depth exposition of this topic, you really clarified all the obscure aspects of this topic. Thank you so much.

  • @sushilk5349
    @sushilk5349 3 года назад +1

    Very good information, Thank You So Much Naveenji.

  • @atiqgee
    @atiqgee 3 года назад

    Brilliant Naveen!! Really grateful for all this explanation.

  • @CharanDrafts
    @CharanDrafts 3 года назад +1

    You nailed it Naveen sir🤩👍

  • @lopamudradash4555
    @lopamudradash4555 3 года назад

    Many thanks Naveen for explaining in depth..really helps alot to understand the internal structure

  • @praveenkalepu2952
    @praveenkalepu2952 3 года назад

    Really helpful for the students from BSC like me 🙏🙏🙏 ❤️❤️❤️ Thank u so much sir 🙏

    • @ankitmahajan8295
      @ankitmahajan8295 3 года назад

      You are the same guy who said bullshit in the last live video? grow up and mind your language when you talk to your seniors like naveen and elders. this will help you when you work in a company.

    • @praveenkalepu2952
      @praveenkalepu2952 3 года назад

      @@ankitmahajan8295 That's why I realised and said sry bro and even u don't know my scenario as I lost my super chat twice and after that I've done another super chat and sir didn't even picked that one so in that mood I've done like that I hope you understand my mistake

  • @nurlanshukurlu
    @nurlanshukurlu 3 года назад +1

    Great topic to discuss with friends . Thanks Naveen

  • @udaypandey5659
    @udaypandey5659 3 года назад +4

    2nd part of this question was interesting !!

  • @AshishKumar-tz3rp
    @AshishKumar-tz3rp 3 года назад +2

    Such a depth explanation very nice 👍

  • @ashuiet
    @ashuiet 3 года назад +1

    Really deeply explained.

  • @pavankumarvedantham7753
    @pavankumarvedantham7753 3 года назад +1

    Hi Naveen. Have been following your articles and I loved it. Want to know how to prepare hacker rank for automation. Kindly let me know. Thanks.

  • @demystifyselenium3055
    @demystifyselenium3055 3 года назад +3

    Hi Naveen..
    Variable "out" here is declared as public static final PrintStream out = null ;
    1. Generally when we use final keyword, variables becomes constant (i.e, We cannot change it), but here we are updating variable using setOut0 native method.. Please clarify on this query..
    2. Why should we use native method,rather than that we can develop a java method and use it right?
    Please confirm us if it was used for the purpose of reusability.. TIA..
    Thanks for all your efforts from the QA community.. It's nonpareil 😊👍🏻 May the force be with you 👍🏻

    • @naveenautomationlabs
      @naveenautomationlabs  3 года назад +3

      Hi, 1. We are not updating the final out variable, it's just getting initialized from the native method call by jvm.
      2. They could have written the java code for that, but in java there are few concepts which are taken from C in the form of native support.

  • @rakeshpatil937
    @rakeshpatil937 3 года назад +1

    Very useful and deeply explained 👍

  • @Iam_namangupta
    @Iam_namangupta 3 года назад +1

    Great one Naveen

  • @anujshrigiriwar2901
    @anujshrigiriwar2901 3 года назад +2

    Hi, Naveen thanks for excellent teaching through your videos. I wish to request if you can make videos on Java documentation that would be helpful. For any automation engineer or software developer documentation plays a very important role. Please help us educate on it.
    Thanks

  • @suryavegi3689
    @suryavegi3689 3 года назад +4

    Hi Naveen Sir, “out” is by default a final variable, so how is it possible to override the final variable in java? Please clarify it

    • @gayus7443
      @gayus7443 2 года назад

      we are not overriding it, we are reinitializing it. Final variables can be reinitialized.

  • @iftyahmed1690
    @iftyahmed1690 3 года назад +1

    Helpful information.

  • @hariprasad-hz3pk
    @hariprasad-hz3pk 3 года назад +1

    That's Helpful :) Thanks a Ton @naveen

  • @sameerkadgaye2048
    @sameerkadgaye2048 3 года назад +1

    Thank you so much sir 🙏🙏 very nice explained

  • @mohanreddymutra1756
    @mohanreddymutra1756 3 года назад +1

    Good knowledge. Thanks

  • @snehaparekh8502
    @snehaparekh8502 3 года назад +1

    It was way to deep snd detailed.. 🙂👍🙏

  • @shivamkadu5010
    @shivamkadu5010 3 года назад +1

    Important 🙏

  • @SenthilKumar-fo6kq
    @SenthilKumar-fo6kq 5 месяцев назад

    @naveenautomationlabs
    Why can't we create an object of printstream class and access println method? Please explain

  • @udayshankarusa
    @udayshankarusa 3 года назад +2

    Hi Naveen, Thanks for the good explanation. I need small clarification here. While executing the c program which compiler has been used? As I know c files will be executed in gcc compiler. That means inside jvm is there any gcc compiler available? Can you clarify on this. Just for curiosity am asking.

    • @naveenautomationlabs
      @naveenautomationlabs  3 года назад +1

      Using JNI a java program has the capability to call the native C code. Java native interface (JNI) is a framework provided by java that enables java programs to call native code and vice-versa.

    • @mauryar16
      @mauryar16 3 года назад

      Thnx for this ....Even I was thinking same

  • @sumitgoyal385
    @sumitgoyal385 Год назад

    thanku very nice lecture

  • @kumaranthiru203
    @kumaranthiru203 3 года назад +1

    Thanks naveen

  • @lokeshsharma-gd1xo
    @lokeshsharma-gd1xo 3 года назад

    Hello Naveen,
    Plz start a next series on Java stream, immutable array, now a days lot of companies asking same question

  • @syedmuneebali8540
    @syedmuneebali8540 3 года назад +1

    very informative!

  • @sridharlanka2721
    @sridharlanka2721 3 года назад

    out is an Static variable which is declared in System class and is of type - PrintStream
    if out is a static variable , then how come an variable can access method ?
    =============================================================
    Here "out" doesn't call a method : out is a variable which is actually holding an reference to an object (and the object here is an instance of PrintStream Class) on which you can call a method.(println())

  • @akashdiware1583
    @akashdiware1583 3 года назад

    It means that JNI can manipulate variables the way it wants inspite of setting it as final?

  • @jatinsharma3792
    @jatinsharma3792 2 года назад

    I have one question what actually happens when you try to link 2d aray in inside main(String [ ] [ ] ?

  • @albertosoto4280
    @albertosoto4280 Год назад

    I have a doubt. With which value out method gets inicialized? If it is a reference... a reference to what?

  • @anshupanda2149
    @anshupanda2149 3 года назад

    Hi Naveen ,
    What's the diff btn
    System.out & System.err
    ,When ever we refer to any blog we get only one ans i.e. err is used to promot the error msg to the console ,nd out for General output. What's ur takes on this .Any in-depth ans can I get it or even a video will be also fi9 .

  • @vikrantharne9345
    @vikrantharne9345 3 года назад

    in which scenario value of final variable can be changed?

  • @sagarsapkota8415
    @sagarsapkota8415 Год назад

    when out=null is passed to native method setout0(printstream out) then what is happening ?

  • @sanskarsharma5061
    @sanskarsharma5061 3 года назад

    sir plz guide mera college me subject b.com the or me software testing ka course kar raha hu to kya IT company me job lagne ke chance he kya?

  • @samarohochattopadhyay7407
    @samarohochattopadhyay7407 10 месяцев назад

    instead of using the system class why don't we directly use the PrintStream class for using the println method?

  • @pandudamera7211
    @pandudamera7211 3 года назад +1

    Thank you brother

  • @crickettales6594
    @crickettales6594 3 года назад +1

    👍👍

  • @abhisheksinha3119
    @abhisheksinha3119 3 года назад

    Why we are directly not using PrintStream instead of System.out to print something?

  • @shasankkumar7246
    @shasankkumar7246 3 года назад

    what about printf and print

  • @sivaramapandian3923
    @sivaramapandian3923 3 года назад

    kindly start python series

  • @mauryar16
    @mauryar16 3 года назад

    Hi Naveen,
    Can you plz explain
    driver.switchTo().alert().accept();
    in same manner??

  • @pa1gupta
    @pa1gupta 3 года назад

    Not clear about how JVM internally calls setOut method.

  • @sssaamm29988
    @sssaamm29988 3 года назад

    I couldnt get the statement ,when the class is loaded static variables are initialised.i know that when a class is loaded into memory static block is executed.can someone explain me this concept of initialising the static variables at time of class loading.

    • @ayushgupta8239
      @ayushgupta8239 3 года назад

      The concept is same as it is for static block and main method.

    • @naveenautomationlabs
      @naveenautomationlabs  3 года назад +2

      Loading (loads the required class/jar files), Linking (assigning references and verification) and Initialization (initializing static variable and execution of static block )

  • @deeptisharma9154
    @deeptisharma9154 7 месяцев назад

    pl give my interview......

  • @santoshram1241
    @santoshram1241 Год назад

    Thanks brother