What is primitive and non-primitive?What is int i and integer i?

Showing Answers 1 - 2 of 2 Answers

gudlarajesh

  • Nov 4th, 2005
 

primitive data types are the datatypes which are not objects as they are present in c and c++. eg.int,chat etc.

where as non primitive are the datatypes which are considered as objects eg. String.

this is one of the reason why java is not a purely object oriented lang as the primitive data types are also allowed in java

  Was this answer useful?  Yes

anurag

  • Aug 15th, 2011
 

A primitive data structure is generally a basic structure that is usually built into the language, such as an integer, an array or a linked-list. Primitive types are declaration types and the primitive type is already defined by the java programming language. There are eight primitive types defined in java, char, Boolean, short, void, long, float, double.

A non-primitive data structure is built out of primitive data structures linked together in meaningful ways, such as a binary search tree, AVL Tree, Hash table, etc.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions