+ 2

Their are four storage class in c and my question is can use these storage class in java

24th Apr 2017, 1:18 PM
Nikhil
Nikhil - avatar
3 Respuestas
+ 2
automatic , static,extern , register this is storage classes in c
25th Apr 2017, 2:28 AM
Nikhil
Nikhil - avatar
+ 1
What storage class do you mean in C?
24th Apr 2017, 4:58 PM
Highman
Highman - avatar
+ 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.
25th Apr 2017, 5:59 AM
Highman
Highman - avatar