I want to create new content type using 2 existing content type. Please suggest how this can be done. Also, in future, if I make changes to inherited content types, will it be reflected in the new one created above
I’m not sure what you’re asking for is supported. You can relate two content types together into a parent, but each of the “inherited” children types would be created on their own.
What’s the use case for this question?
Yes, if you have two content types, Apples + Pears, you could make another content type called ‘Fruit’ that is just a title and a relationship to Apple + Pear (and then add any other unique field it would need)
Changes to the individual types would carry over. That is, if you modify Pear later, Fruit would be affected.
Alternatively, you could copy the larger one, and then add the fields for the second one. This would not be dependent on the previous two for changes, but maybe that’s good. This is the sloppy, copy-paste method.
Content Types themselves are not ‘objects’ that can be ‘added to’ as in Java.
Lastly, you can also achieve something that isn’t directly obvious - you can form your query (as in $dotContent.pull) to pull from multiple CTs if there is some shared key (or you want them all). So you could build a sort of on-the-fly content type that combines two or more things. You can also merge these into one list object. This would give you some of Java’s flexibility but at some extra complexity.