What Is A Datatype? What Are Private, Public And Protected Classes?

1 Answers

ayesha sana Profile
ayesha sana answered
The data types relate to type of data that can be stored in a particular field of table or in any specific variable, it can be number, integer or character.

Following are the three reserved words that are used in Java programming language:

Private:

Private is a function which is used in Java it refers to private variable or methods only within a single function. This means that the variable or the method which exist in the form of private keyword can serve within a function on which these were created.

Protected:

Protected is also a keyword which is attached to the variable or with the methods. This refers to the variable or the methods that can serve within a class. It means that the variable or the methods can be used within same class but in different functions. A class can be more then one different function but must have same protected variable or methods.

Public:

Public is also a reserved word which is used in Java. It also refers to a global variable or method. It means that variable or method have keywords of public with them that can be called within a function, outside of function within a class and also outside of class.

Answer Question

Anonymous