چند نکته در مورد Object و Method در جاوا

  • Object is an instance of a class.
  • Instance is a memory location at RAM that created dynamically at run time.
  • Object is a memory location in the RAM reserved dynamically for the members of the class.
  • we can create an object by providing/using a "new" keyword with constructor.
  • After creation of object we need to store the memory location and the address of that memory location. by creating a reference variable we can store the address of that object. example: Demo d1 = new Demo();
  • whenever we create the object, it creates a new copy of non static variables in those instances. These variables change from one instance to another instance and they are known as instance variables.
  • Java loads signature of method in RAM when we call a method and also load signature of methods from library which we use in program


نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد