C/C++ struct functionality can be replicated.
PHP Code:
function somestruct() {
temp.var = new TStaticVar();
with (temp.var) {
// definitions
}
return temp.var;
}
A = somestruct();
vs.
PHP Code:
typedef struct {
// definitions
} somestruct;
somestruct A;
C++ classes, however, cannot be fully replicated (though I intended to request something that would... And then my computer died).
Classes in GS2 can be thought of as a mixture of #include and a class declaration. Joining a class gives access to its code and in ambiguous situations, should be called like class::func();.
I know jack about java, though. Sorry if this isn't a good explanation, it's very hard to type on an iPod.