Showing posts with label programming language coaching Ahmedabad. Show all posts
Showing posts with label programming language coaching Ahmedabad. Show all posts

Tuesday, January 1, 2019

What is dynamic Method Dispatch? tccicomputercoaching.com

What is Method dispatch in Java?

It is process of selecting implementation of polymorphic operation to call run time or compile time.


There are two types of Method dispatch or Binding in Java.

1) Static binding in Java

This occurs during Compile time. Static binding also known as early binding or compile-time binding.
Private, final and static methods and variables uses static binding and bonded by compiler

2) Dynamic binding in Java

This occurs during Runtime. Dynamic binding is also known as late binding or run-time binding.
Virtual methods are bonded during runtime based upon runtime object.

Method overriding is one of the ways in which Java supports Runtime Polymorphism. Dynamic method dispatch is the mechanism by which a call to an overridden method is resolved at run time, rather than compile time.

  • When an overridden method is called through a super class reference, Java determines which version (super class/subclasses) of that method is to be executed based upon the type of the object being referred to at the time the call occurs. Thus, this determination is made at run time.
  • A super class reference variable can refer to a subclass object. This is also known as up casting. Java uses this fact to resolve calls to overridden methods at run time.

syntax:

super class object=new subclass;

Therefore, if a super class contains a method that is overridden by a subclass, then when different types of objects are referred to through a super class reference variable, different versions of the method are executed.

Advantage:

  • Dynamic binding implements Runtime Polymorphism.
  • It also allow subclasses to add its specific methods subclasses to define the specific implementation of some.
To learn more about Java join us @ TCCI.

Faculty of TCCI teach different Courses like Basic Computer Course , Programmming Course, Web Designing Course, Project Training Course, Web Developmnet Course, Typing, SEO, Coaching for All Engineering Branch , Maths Coaching, School Computer Course Coaching.

You can join as per your interest. We have 2 branches , one is in Bopal and another one is in Satellite. We conduct online computer coaching also.

Visit us @ http://tccicomputercoaching.com/blog/

Call us @ 9825618292

Wednesday, December 12, 2018

Is java Pure Object Oriented Language? tccicomputercoaching.com

Definition

"PURE OBJECT ORIENTED PROGRAMMING LANGUAGE” means language which SUPPORTS or HAVE features which treats everything inside program as objects,

For any language to be pure OO everything should exist as objects but in JAVA we have eight primitive data types such as int, byte, char etc which are not objects .



How we can decide any programming Language is Pure Object Oriented or not?

strictly...
 
1) It must have full support for Encapsulation and Abstraction
2) It must support Inheritance
3) It must support Polymorphism
4) All predefined types must be Objects
5) All user defined types must be Objects
6) Lastly, all operations performed on objects must be only through methods exposed at the objects.

Now, java supports 1, 2, 3 & 5 but fails to support 4 & 6.

Why java is not Pure Object Oriented Language?

i) Purely object oriented means it should contain only classes and objects. It should not contain primitive data types like int,float,char,etc..Since they are neither classes nor objects.
 
ii) Pure object oriented language,we should access every thing by message passing . But,Java contains static variables and methods which can be accessed directly without using objects.
 
iii) Java does not contain multiple inheritance. It means an important feature of object oriented design is lacking .so how can we say it is purely object oriented?

To learn more about Object Oriented Languag, Java , C+ +, Python at TCCI.

TCCI teach all programming Languages in Bopal and satellite, Ahmedabad.

Call us @ 9825618292

Visit us@ http://tccicomputercoaching.com/course/

Tuesday, November 27, 2018

What is the use of Structure in C? tccicomputercoaching.com

Structures have very efficient role in c. As you can see the Array- it is used for same type of data. It contains you can have different type of data to define a real-time entity like books, student, etc.



Structure is a data type which allows to store different type data at same location at same time.

The most efficiently data structures are used in c is stack, queue, tree, linked list, doubly linked list, hash table etc.

Use of Structure:


  • Suppose you are having record of 100 students. Each student is having name(which is of char[] type), id(int type) and marks(float type). All these three properties is uniquely owned by each student. Each student will carry this three different data type information.
  • Now, suppose you have to pass complete information of all students to one function for some reason. At that point rather than passing each and every information (name, id, marks, etc...) one by one for every student will not be a good way of programming. In such case we will prefer approach in which can pass complete student information as an single entity of one by one student.
  • Hash table, it is used for making table for particular entity. For example an attendance register of a classroom. ( Inside system, kernel maintains process table, file table, inode table, etc etc.)
  • So, where ever we need to refer different data types information as an single entity then we go for structure and above is the real time example where we would like to go for structure.
  • TCCI can teach you all programming Language at your flexible time.


To learn Structure in C at TCCI .

Call us @ 98256 18292

Visit us @ http://tccicomputercoaching.com/course/