NULL & NullPointerException | Java Tutorial | By Mr.Hari Krishna

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ • 143

  • @NareshIT
    @NareshIT  5 років тому

    Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL

  • @tappu8
    @tappu8 8 років тому +6

    Sir, I am a student of you.
    I likes your teaching style because you always teaching us not like a faculty but teach us how can we understand i.e the very powerful inspirational part of a faculty.
    So upload these types of concepts videos which will help us in future.
    Thank you NiT

  • @ThePratapunique
    @ThePratapunique 8 років тому +1

    I have taken coaching in 2006, One of the best Java faculties @ Ameerpet with in-depth knowledge transfer of all Java concepts, students gain more knowledge than working professionals.I was able to get a job soon after graduation bcoz of his coaching. students with zeal, patience, consistence, persistence can blindly take his coaching.

  • @Coder_Mama
    @Coder_Mama 8 років тому +2

    Sir, the day I started attending your class, from that onwards, I am fan of you like anything. Now I am working in a MNC, my manager always appreciate my code..

  • @HateAcceptedButThinkAgain
    @HateAcceptedButThinkAgain 8 років тому +21

    How many of you guys did catch the motto behind this assignment..?
    When you assign int i1 = "HK"; you get a compile time error saying "String can't be converted to int". It means that literal "HK" is of String type.
    But, when you assign int i2 = null; compiler doesn't show error like "Object can't be convetred to int" instead it says " can't be converted to int", Which proves that stand-alone null literal isn't of any specific type,but it can be assigned to any reference-type.

  • @solotravelerrk
    @solotravelerrk 8 років тому +1

    Nice sir... When I was watching this video.. I am feeling like now I'm in class... Thanks sir for provide this videos ...

  • @Vijay-cs8uy
    @Vijay-cs8uy 8 років тому

    He is great person and his strategy is very good to learn java.So many people got job because you i am also one of them thank you Hari sir. Don't display your contact information many times in between session it will disturbs you can display in the beginning of session or in the end of the session.

  • @MUKESHKUMAR-vh4mb
    @MUKESHKUMAR-vh4mb 8 років тому

    Enjoying sir as usual whenever i listen to you..such a wonderful explanation..Thank you sir.
    incompatible types: cannot be converted to int
    int i1=null;
    ^
    incompatible types: String cannot be converted to int
    int i2="HK";
    ^

  • @airaaira8407
    @airaaira8407 8 років тому

    thank sir giving a such type confidence to the students
    I really like that way teach u
    in fact I'm a non it student iam never facing any difficulty in learning Java this is only because of u

  • @sranjithkumar8883
    @sranjithkumar8883 8 років тому

    you are great sir any faculty is after you ,you will inject the concept in many ways for us,you will entertaining class according to subject thank you sir

  • @WriteCodeWithPrince
    @WriteCodeWithPrince 6 років тому +2

    Very nice video sir i am proud of you.
    I am from bihar motihari jila.
    Thanks u for upload this video
    To teach

  • @arunpratapsingh786
    @arunpratapsingh786 6 років тому

    Thank you sir toady I got null & nullPointerException concept really very good
    Thanks again sir

  • @AmitMishra-hv2zw
    @AmitMishra-hv2zw 8 років тому

    Great sir.........no words for explaining......thanks for video......

  • @mayurkumar5148
    @mayurkumar5148 8 років тому

    sir, the way you teach and the way you inject the concepts is really friendly..
    thank you very much sir..sir we are eagerly waiting for JVM architecture videos

  • @ser.lalookumar5231
    @ser.lalookumar5231 7 років тому +3

    Superb explanation sir ji...

  • @jayeshpandey2905
    @jayeshpandey2905 8 років тому +1

    Thank you sir...wonderful explanation...i'm eagerly waiting for next video of this topic.

  • @deepakSahu-oy2dl
    @deepakSahu-oy2dl 8 років тому

    so now thorugh these videos we can learn from anywhere , thnku sir

    • @NareshiTechnologies
      @NareshiTechnologies 8 років тому

      Our pleasure and do visit the channel for continous learning

  • @rafishaik8870
    @rafishaik8870 8 років тому

    great explanation sir INT is a primitive data type thats why compile time error will be occurred

  • @srinivasvenkata9069
    @srinivasvenkata9069 8 років тому

    sir, i really love your teaching in fact i am biggest fan to your lecture .

  • @nareshroyalzz8459
    @nareshroyalzz8459 6 років тому +1

    Null is a any referenced type literal that type should be array,class, interface,enum,annotation.
    Null used to avoid compile time errors. To assigning variable, using null but don't use directly at object level only we r using referenced type of null .

  • @gauravjava6720
    @gauravjava6720 2 роки тому

    intruged to see him from online sessions much of my temptation is satisfy now

  • @nareshroyalzz8459
    @nareshroyalzz8459 6 років тому +2

    Thank you 4 giving u r subject on UA-cam

  • @jdgroups7241
    @jdgroups7241 6 років тому

    HK SIR......WONDERFULL EXPLANATION SIR...
    NO ONE CROSS YOUR KNOWLEDGE THAN U SIR....
    --JD SARKAR (ONGOLE) YOUR STUDENT SIR

  • @imranshaik2034
    @imranshaik2034 8 років тому

    we are feeling we are in your live class and we are giving answers also Sir, thank u sir

  • @truptiraut4177
    @truptiraut4177 8 років тому

    int i1=null; CE:-incompatible type ,,, null can't converted into int.
    int i2="HK"; CE:-incompatible type,,,,,string can't converted into int.
    Thank you sir , for this wonderful explanation plz explain and share more videos like this

  • @harshalkadu6985
    @harshalkadu6985 3 роки тому +1

    the next topic operation performed using null i cant able to find out????

  • @swathihegde7475
    @swathihegde7475 3 роки тому

    Your explanation is good

  • @Sriram_Chhotaray
    @Sriram_Chhotaray 8 років тому

    thank u sir...nyc vdo....really you make it simple to understand d concept....waiting for the null pointer exception part....

  • @musicicon4184
    @musicicon4184 8 років тому

    super teaching and very good explanation

  • @busamnagamukteswari1140
    @busamnagamukteswari1140 8 років тому

    Sir,Your Explanation was very good.I am waiting for second video of this topic and also whole collections topic videos.sir please upload very soon.

  • @TechieBirendra
    @TechieBirendra 8 років тому

    Very nice Explanation...
    This is the reason we are fan of Harikrishna Sir... Sir please upload a video on this() keyword also.
    thank you :)

  • @sanjeev2634
    @sanjeev2634 8 років тому

    very good explanation Sir. we need you class on Exception handing..

  • @bharathpeddi4494
    @bharathpeddi4494 8 років тому

    this video is very helpful to project side

  • @subhamsingh8110
    @subhamsingh8110 8 років тому

    it's awesome sir...!!!

  • @CoupleInAmerica
    @CoupleInAmerica 8 років тому

    great sir.....Very good explanation

  • @jayeshpandey2905
    @jayeshpandey2905 8 років тому +5

    int i1=null;---->CE:incompatible types: cannot be converted to int
    int i2="HK"--->CE:incompatible types: String cannot be converted to int
    sir , if String of referenced type can not be converted to primitive type int & also null of (...............) can not be converted to primitive type int.
    here i wrote blank_space to fill the the type of . So if you carefully observe in errors, you will get to know... and String can not be converted to primitive type int and String belongs to referenced type so is of referenced type...
    Thanks.

    • @saikrishna6016
      @saikrishna6016 5 років тому

      Ya I too have the same Dought........!
      Could anyone can give a clarity

  • @nareshroyalzz8459
    @nareshroyalzz8459 6 років тому +1

    Thank you so much sir!

  • @ManOfWords9-
    @ManOfWords9- 8 років тому

    null , is not specific to any data type . It does not fall under the range of any datatype because it does not presents any data as it is used to represent nothing. If you want to store nothing use null. So main point is that null can be used for class, enum, annotation, array, interface, but it is has to be tell explicitly .

  • @rahuljha1831
    @rahuljha1831 8 років тому

    Superb

  • @iamnikhiljain
    @iamnikhiljain 8 років тому

    hello sir, and thanks for another extra ordinary explanation . can you plz give a lecture on "Jvm inside proccess" bcoz i missed that class .
    regarding nikhil jain.

  • @shubhampatil2876
    @shubhampatil2876 8 років тому +4

    Sir,can u able to provide video lectures on Collections?

    • @JavaHariKrishna
      @JavaHariKrishna 8 років тому +5

      We will provide very soon
      Actually we are working

    • @azharmohammed460
      @azharmohammed460 8 років тому

      Sir i am your X student sir will you be able to upload core java videos please ?
      i will be very thankful to you sir ......

  • @rakisahu9842
    @rakisahu9842 8 років тому

    HkSir.java:5: error: incompatible types: cannot be converted to int
    int i1=null;
    ^
    HkSir.java:6: error: incompatible types: String cannot be converted to int
    int i2= ("hk");
    these two errors are comming after compile dis program.
    Really sir, i enjoyed dis video like anything.

    • @alokranjannayak2984
      @alokranjannayak2984 8 років тому

      Please try this
      Integer i1= null;
      String[] s= null;

    • @PrashanthKumarEEE
      @PrashanthKumarEEE 8 років тому

      int is a primitive not reference type , Integer is reference type

  • @binayrai2522
    @binayrai2522 7 років тому

    Good job sir keep it up

  • @Pankajkumar-gk8ty
    @Pankajkumar-gk8ty 8 років тому

    super explanation

  • @mahafilms4821
    @mahafilms4821 8 років тому

    Thankyu sir......thankyu NIT

  • @rajasekhar3795
    @rajasekhar3795 8 років тому +1

    please upload remaining topic of NullPointerException

  • @sagarkumarsingh4217
    @sagarkumarsingh4217 8 років тому

    #Awesome #sir

  • @RANJEETKUMAR-vg4yi
    @RANJEETKUMAR-vg4yi 7 років тому +1

    Sir please upload next video of null And NullpointerException.

  • @satyavani9940
    @satyavani9940 8 років тому

    Please upload more videos of Harikrishna Sir on core java concepts.

  • @ashachoudary5736
    @ashachoudary5736 8 років тому

    Thank u sir please upload the pass by value topic

  • @kuldeeptiwari-mm2cp
    @kuldeeptiwari-mm2cp 8 років тому

    sir plz upload one video of singleton class and its uses in real time and its advantage..........thank you sir in advance

  • @rajatjain4593
    @rajatjain4593 8 років тому

    yes ready

    • @Pankajkumar-gk8ty
      @Pankajkumar-gk8ty 8 років тому

      nice explanation plz upload 2nd video of null and null pointer exception.

  • @ABHISHEKKUMAR-ze2fr
    @ABHISHEKKUMAR-ze2fr 8 років тому

    in video also sir is given last option as a correct answer

  • @SVSwamy-bd6bt
    @SVSwamy-bd6bt 8 років тому

    Sir please upload the second video of Null & Null pointer exception.....waiting....!!

  • @banalasai7643
    @banalasai7643 4 роки тому

    HK product here.
    Thank you sir.

  • @sT-mc9kp
    @sT-mc9kp 6 років тому

    good tutorial.

  • @ramashraykumar7712
    @ramashraykumar7712 8 років тому

    i am very thank full us

  • @sunilkumarvangali9016
    @sunilkumarvangali9016 7 років тому

    Sir, in this video you have explained about only null and what about NullPointerException related points.. you have said, in continuous of this video we will discuss about it but i am not able to find that continuous video

  • @luckpie00
    @luckpie00 6 років тому

    Very nice sir

  • @subhashreenayak348
    @subhashreenayak348 7 років тому

    Sir Please upload the last 2 points video.. Waiting for the next video of null and null pointer exception.. Please sir upload more videos as possible... It makes our career...

  • @ucantcme2665
    @ucantcme2665 8 років тому +1

    error: incompatible types: cannot be converted to int
    int i1 = null;
    error: incompatible types: cannot be converted to int
    int i2 = null;

  • @lipikadash8501
    @lipikadash8501 8 років тому

    Thank u sir

  • @victor8888
    @victor8888 8 років тому

    its good video thnx sir but second video I want to see? plz upload as soon as possible

  • @sohailsiddiqui7175
    @sohailsiddiqui7175 7 років тому

    Sir have u made any video to use null

  • @nareshroyalzz8459
    @nareshroyalzz8459 6 років тому +2

    Before null we have to use cast operator to avoid ambitious errors
    Like
    System.out.println((String)null);
    System.out.println((Integer)null);
    System. out.println((int[ ] null);

  • @umeshsalhotra6817
    @umeshsalhotra6817 8 років тому

    sir please make the video on java networking

  • @chandankumarsahu3947
    @chandankumarsahu3947 8 років тому

    int i1=null// incompatible types: cannot be converted to int
    int i2="HK"//incompatible types: String cannot be converted to int

  • @alokranjannayak2984
    @alokranjannayak2984 8 років тому

    Grate explanation sir
    while assigning variable type the program runs smoothly but while using cast operator type compiler throws error...
    Please clarify it..

    • @JavaHariKrishna
      @JavaHariKrishna 8 років тому

      can you pls post the code where you are getting error?

    • @alokranjannayak2509
      @alokranjannayak2509 8 років тому

      public class ExampleNull {
      public static void main(String[] args) {
      Integer(null);
      {
      System.out.println(Integer(null));
      }
      }
      }

    • @jvsnyc
      @jvsnyc 4 роки тому

      @@alokranjannayak2509 That's not a cast, it is trying to call the Integer constructor with null as a value. You meant (Integer)null

  • @VedPrakash-ow7yv
    @VedPrakash-ow7yv 8 років тому

    thanku sir

  • @deveshpandey7154
    @deveshpandey7154 4 роки тому +1

    error: incompatible types: cannot be converted to int
    int i1 = null;
    error: incompatible types: String cannot be converted to int
    int i1 = "HK";
    ^

  • @ShwetaKarne-xz7rq
    @ShwetaKarne-xz7rq 3 місяці тому

    where can I find part 2 of this video..please help

  • @musalareddy7862
    @musalareddy7862 3 роки тому

    it is incompatible types "String cannot converted into int type"

  • @umeshsalhotra6817
    @umeshsalhotra6817 8 років тому

    Add more and more videos on core java

  • @mdjainoddin8173
    @mdjainoddin8173 7 років тому

    sir please upload the next video related to Null pointer Exception

  • @AsgharHussein
    @AsgharHussein 8 років тому

    Sir, when are you going to upload videos on Collections?
    Regards

  • @himats7195
    @himats7195 6 років тому

    Cannot find null pointer exception video..in the end you said about continuing in next video..

  • @lakshmidurga5362
    @lakshmidurga5362 8 років тому

    sir pls upload JVM architecture because I was missed that cls

  • @rajasekhar3795
    @rajasekhar3795 8 років тому

    please upload packages topic

  • @vaibhavglasgow
    @vaibhavglasgow 7 років тому

    Hi,May I please know how much do u charge for core java and advance java online training course.
    Many thanks

  • @jayakrishnaankam7996
    @jayakrishnaankam7996 7 років тому

    greetings!!
    String and null can not be converted into int type.....

  • @reddyyogi959
    @reddyyogi959 6 років тому

    Incompatible type null can't be convert into integer ,string can't be convert into integer

  • @somyakantapradhan883
    @somyakantapradhan883 8 років тому

    in just 16mins HK sir clear the base...

  • @shivankitshekhar8365
    @shivankitshekhar8365 6 років тому

    we need more videos sir plss

  • @RANJEETKUMAR-vg4yi
    @RANJEETKUMAR-vg4yi 7 років тому +1

    Sir ,i am your student. My class time 9 O'clock morning . sir you gave one assignement for solve .i did solve my ans is......
    int i1=null;-->CE:incompatible types: cannot be converted to int
    int i2="HK"--->CE:incompatible types: String cannot be converted to int

  • @kumarkaushal5791
    @kumarkaushal5791 8 років тому

    which datatype of null ?,store which data type

  • @sohailsiddiqui7175
    @sohailsiddiqui7175 7 років тому

    An instance of type null cannot be of type int

  • @AbiramiMurugan
    @AbiramiMurugan 2 роки тому

    Exception in thread "main" java.lang.Error: Unresolved compilation problems:
    Type mismatch: cannot convert from null to int
    Type mismatch: cannot convert from String to int

  • @itsok92
    @itsok92 6 років тому

    error: incompatible types: cannot be converted to int
    int i1=null;
    error: incompatible types: String cannot be converted to int
    int i2="hk";

  • @krishu1624
    @krishu1624 3 роки тому

    incompatible types: cannot be converted to int
    incompatible types: String cannot be converted to int

  • @azharmohammed460
    @azharmohammed460 8 років тому

    Sir i am your X student sir will you be able to upload core java videos please ?
    i will be very thankful to you sir ......

  • @ManabenduBardhan
    @ManabenduBardhan 8 років тому

    sir plz upload collection vdo

  • @buntykumar5928
    @buntykumar5928 8 років тому

    upload full video on java

  • @imranshaik2034
    @imranshaik2034 8 років тому

    sir please upload about this keyword we missed the class

  • @sunilgarad555
    @sunilgarad555 8 років тому

    incompatible type null can't be converted to int

  • @anandsharma2739
    @anandsharma2739 8 років тому

    Hari.java:5: error: incompatible types: cannot be converted to int
    int i1=null;
    ^
    Hari.java:6: error: incompatible types: String cannot be converted to int
    int i2="hk";
    ^
    2 errors
    Press any key to continue . . .

    • @alokranjannayak2984
      @alokranjannayak2984 8 років тому

      Please try this
      Integer i1= null;
      String[] s= null;

    • @anandsharma2739
      @anandsharma2739 8 років тому

      This file contains characters which can be lost in current encoding.

  • @srinivasvenkata9069
    @srinivasvenkata9069 8 років тому

    error : incompatible types : cannot be converted to int
    int i1=null;
    ^
    error : incompatible types : String cannot be converted to int
    int i2="hari krishna";
    ^

  • @sT-mc9kp
    @sT-mc9kp 6 років тому

    where is the 2-nd part of this video?

  • @manoganesan7618
    @manoganesan7618 6 років тому

    Compilation Error: Cannot convert from null to int(data types)
    java.Lang.error

  • @srinivasvenkata9069
    @srinivasvenkata9069 8 років тому

    when java does not support pointers why does it throw NullPointerException

    • @bhaskarraju2884
      @bhaskarraju2884 8 років тому

      The word "pointer" in NullPointerException is now way related to C,C++ pointers. It is purely with dictionary meaning indicating that method is called on "reference variable" that points to "null" value

    • @mahaveer1993
      @mahaveer1993 8 років тому

      even though java don't have any pointers, internally everything is run with pointers and references. So nullpointerexception means the object is pointing to null (empty) instead of something compaitable element .when Object is empty this exception is thrown

  • @yashwanthreddygowreddigari1997
    @yashwanthreddygowreddigari1997 3 роки тому

    the answer is int cannot be converted into null and int cannot be converted into string