struct Phant {
   int y;
   struct Phant y;
};
In this code I am getting a compilation error.
On writing the same thing in Java with just a minor change, i.e, replacing struct with class, the code runs perfectly
class Ded {
    int y;
    Ded s = new Ded();
}
Why do I get a compilation error in the first snippet while the second snippet works?
 
     
    