Computer Science, asked by bishnupriyapanda218, 3 months ago

Write a short note on non primitive data type in java. In 50 words.​

Answers

Answered by MaheshSaroj
1

Answer:

Java is a language that is widely used in the industry of computer science. The specialty of Java is that it provides predefined data types (i.e., primitive data types). These data types have no additional methods attached to them and are pre-defined. The other type of data that Java has is non-primitive data. This data type is provided by the programmer.

Non-primitive data types

There are four types of non-primitive data:

array: This is a data type used to store data in a consecutive manner. It can store any type of data as the size of the array is also declared by the programmer.

String: This is a data type that is used to store consecutive characters or proper sentences (e.g., String abc = "Educative is an excellent tutor";).

class: Classes are used to create objects. They are a very well-mannered way of merging different pieces of data into a single object.

interface: An interface is like a dashboard or control panel for a class. It has buttons/functions for the data types defined, but the implementation is somewhere else.

Answered by StutiAralikatti
1

Explanation:

Non-Primitive Data Types: These data types are not actually defined by the programming language but are created by the programmer. They are also called “reference variables” or “object references” since they reference a memory location which stores the data.

hope it helps you out

Similar questions