Computer Science, asked by bidyarani9910, 1 year ago

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 Anonymous
4
HEY........^_^;


Here's ur ans. ⬇


___________________________________


PACKAGE is the keyword which is used to declare class variables and class methods .



_____________________________________



hope \: it \: helps
Answered by smartbrainz
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