Can I say "immature" instead of "childish" in this context?

Native speaker’s answer
Rebecca
Yes, you could! For something to be "childish" you can consider it "immature" or "infantile". Ex: She stuck her tongue out at Jane. What an immature thing to do! Ex: Jen made an infantile joke that wasn't funny. I tried to laugh.