List types of storage classes in java?


Posted On: Feb 22, 2018


There are basically four types of storage classes in Java:

  • Automatic storage class: When a variable that is used in the coding is defined within a function and that also with the auto specifier then it simply belongs to this storage class.
  • Register storage class: Those variables in the coding which are declared by the register specifier then it belongs to this storage class.
  • Static storage class: It has a function to declare the variable with the help of the static specifier and that is how it belongs to the static storage class.
  • External storage class: The main objective with this is that the variable which is being declared consists of external linkage.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Cyient Java developer Interview Questions

    What is difference between throw and throws ?

    Difference between throw and throws are:Throw ThrowsIt is basically used inside the function. It is used when it needs to insert the exception. It is basically present in the function ...