Specifying location: Do you use ga/wa and does the word order matter?


Here are some Japanese sentences:

A)

_Uses ga. Subject comes first_

> Who is (existing) over there? / Dare-ga asoko-ni imasu ka? だれが あそこに います か。

B)

_Uses ga. Location comes first_

> There is a dog over there. / Asoko-ni inu-ga imasu. あそこに いぬが います。

C)

_Uses ga. Location comes first_

> There are comic books here./ Koko-ni manga-ga arimasu. / ここに まんがが あります。

D)

_Uses wa. Subject comes first_

> Where is the hotel (located)? / hoteru wa doko ni arimasu ka

In these sentences, the order of the subject/location is different. The marker
also changes (ga & wa).

Is there are rule to follow, or does the order/marker not matter?

I know Japanese makes a difference between `imasu` and `arimasu` for animate
and non animation subjects. I'm not sure if that affects the marker and word
order.




The order does not matter in Japanese The only rule is that the verb must come
last (aside from sentence-ending particles). The following are all correct and
mean the same thing:

> 6時に私がケーキを食べた  
>  ケーキを私が6時に食べた  
>  私が6時にケーキを食べた

They all mean "I ate (the) cake at 6:00". In English, which relies on word
order to determine grammar roles of words, flipping around the subject and
object would make the sentence sound weird ("The cake ate me at 6:00"), but in
Japanese there are particles to show the role of each object, so there's no
ambiguities.

Technically, Japanese is a strongly left-branching language, meaning the most
important stuff goes at the right (which is why the verb goes at the end, as
it's considered to be the most important part of the sentence). Thus, my first
sentence is centered around that it's cake I ate, with the time being the
least important element; my second sentence focuses on that I ate it at 6,
etc. You don't really need to stress out over this too much, though.

As for your が/は question, it has already been answered
[here](https://japanese.stackexchange.com/q/22/9749).




The order does not matter in Japanese The only rule is that the verb must come
last (aside from sentence-ending particles). The following are all correct and
mean the same thing:

> 6時に私がケーキを食べた  
>  ケーキを私が6時に食べた  
>  私が6時にケーキを食べた

They all mean "I ate (the) cake at 6:00". In English, which relies on word
order to determine grammar roles of words, flipping around the subject and
object would make the sentence sound weird ("The cake ate me at 6:00"), but in
Japanese there are particles to show the role of each object, so there's no
ambiguities.

Technically, Japanese is a strongly left-branching language, meaning the most
important stuff goes at the right (which is why the verb goes at the end, as
it's considered to be the most important part of the sentence). Thus, my first
sentence is centered around that it's cake I ate, with the time being the
least important element; my second sentence focuses on that I ate it at 6,
etc. You don't really need to stress out over this too much, though.

As for your が/は question, it has already been answered
[here](https://japanese.stackexchange.com/q/22/9749).

