Computer Science, asked by ritabratadasbiswas, 1 year ago

how can class be used as user defined data types ?give examples .

Answers

Answered by gurukulamdivya
1

Answer:

Class is a user-defined data type in Object Oriented Programming. The class variables are also known as object which are the central focus of object-oriented programming.

For Example:

public class Dog

{

String breed:

int age;

String color;

Void barking(){}

Void hungry(){}

Void sleeping(){}

}

Similar questions