+ 2
Their are four storage class in c and my question is can use these storage class in java
3 Respuestas
+ 2
automatic , static,extern , register this is storage classes in c
+ 1
What storage class do you mean in C?
+ 1
well,I have heard it as storage specifiers.Java is completely different and there is no one to one migration. So I'd link it as:
static: Use private members (vars & methods or classes) it depends on your goal.
extern: against to oop,similar is a public priviledge
register:no
auto:more difficult,sice to spec C++11 it is class specifiers and from c++11 it is type interface (i.e. for iteration of collection).Java have similar approach for first one. Garb.collector for lifecycle of used variables. The second one can be substitue like generic type.