English

What are Data Types?

Advertisements

Question

What are Data Types?

Long Answer
Advertisements

Solution

Data Types in Java are used to specify the type of data that a variable can store. They determine the nature of values, the memory required for storing data and the operations that can be performed on them.

  1. Primitive Data Types: These are the basic built-in data types used to store simple values such as numbers, characters and Boolean values. Examples include byte, short, int, long, float, double, char and boolean.
  2. Non-Primitive Data Types: These are reference data types used to represent objects and more complex data structures. Examples include classes, arrays, interfaces and String.
shaalaa.com
  Is there an error in this question or solution?
Chapter 5: Primitive Values, Wrapper Classes, Types and Casting - EXERCISE [Page 112]

APPEARS IN

Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 5 Primitive Values, Wrapper Classes, Types and Casting
EXERCISE | Q 2. (i) | Page 112
Dheeraj Mehrotra Computer Science [English] Class 12
Chapter 6 Variables and Expressions
EXERCISE | Q 2. | Page 131
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×