- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Before beginning with the difference, let’s learn what are Primitive Datatypes. Primitive defines immutable values and introduced recently by ECMAScript standard.
- Numbers, eg. 3, 310.20 etc.
- Strings of text e.g. "This text string" etc.
- Boolean e.g. true or false.
After datatypes, let us discuss about Objects:
It associates a key with a value.
Let’s say we take an example of a string with primitive data type and object:
For Primitive Datatype,
var str = "Demo string!";
var str = new String("Demo string!");
It associates a key with accessor functions. This is to store a value.
- What are primitive data types in Java?
- What are the differences between list, sequence and slice data types in Python?
- What are the differences between Java classes and Java objects?
- Java primitive data types
- What are the data types, value types and reference types in C#?