ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

When java dosent support pointers .then why it throws null pointer exception?

user-image
تم إضافة السؤال من قبل basha sk
تاريخ النشر: 2016/01/04

In java Null Objects are used instead of Null Pointers and they Provide an object as a surrogate for the lack of an object of a given type. / The Null Object Pattern provides intelligent do nothing behavior, hiding the details from its collaborators

Gopinath Ramkumar
من قبل Gopinath Ramkumar , Lead Quantitative Manager , Hsbc Securities Services

Pointers are used in Java implementation for references (Oracle JDK is implemented in C++) who develop/implement the language. It is just that pointers are not accessible to developers who use it. So a reference in java is a pointer..

shweta tyagi
من قبل shweta tyagi , Specialist - Backend Development , taqnia

There is a concept of pointers in java. Pointers in Java are known as references . Except int, float, double etc all other non primitive types are reference. They are pointer to a object in heap. Every variable is address of memory location that holds data. when address is zero, it is null pointer and throws null pointer exception

mohammad odeh
من قبل mohammad odeh

Java support pointers but with different name called reference  .

Note that when we use (.) actually meaning -> in other programing languages .

   

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟