Which of the following keyword is used to declare Class variables and class methods ?
(a) static
(b) Private
(c) public
(d) package
Answers
Answered by
4
HEY........^_^;
Here's ur ans. ⬇
___________________________________
PACKAGE is the keyword which is used to declare class variables and class methods .
_____________________________________
Here's ur ans. ⬇
___________________________________
PACKAGE is the keyword which is used to declare class variables and class methods .
_____________________________________
Answered by
4
"Public keyword" is used to declare Class variables and class methods
Option (c)
Explanation:
- Java is an 'object-oriented programming' language. The Java classes are made up of 'variables and methods'.
- Variables declared inside a class are named "instance variables" because each instance of a class includes its own copy of those variables. The data for one object is therefore distinct and different from the data for another. An instance variable can be considered public or private or by default.
- A method contains a "block of statements in a program module".
Similar questions