Well, yes! But also…no.
Generally, food is seen as something to be mindfully enjoyed and appreciated so eating while walking is considered rather improper. Interestingly however, there is a delightful phenomenon known as “tabe-aruki” that comes into play under special circumstances.
Literally translating to “eating while walking”, tabe-aruki is entirely accepted (even encouraged) in areas famous for street food or during festivals, where various yatai (food stands) offer delicious, portable bites to savor while exploring.