The inner class is contained in the outer class, but it is not a member of the outer class (that is, it occupies no storage space). To have one or more info members, you need to define them:
public class Products {
public String Name;
public Info info; // an instance member named info of type Info
public class Info{
public String price;
public String testField;
}
public Products(Products.Info myInfo){
this.Info = myInfo;
}
}
Note that there's nothing special about the member name, you can call it whatever you want:
public class Products {
public String Name;
public Info productInfo; // an instance member named productInfo of type Info
public class Info{
public String price;
public String testField;
}
public Products(Products.Info myInfo){
this.productInfo = myInfo;
}
}