1) Consider the following example:
set protocols bgp group external-peers HELLO
et policy-options policy-statement HELLO term 1 from route-filter 10.0.0.0/16 orlonger
set policy-options policy-statement HELLO term 1 from route-filter 192.168.0.0/16 orlonger
set policy-options policy-statement HELLO term 1 then accept
If we do not define the protocol , does it all routes in inet.0 will be advertsied to BGP peers?
no routes will go to the table they are part of ipv4 to inet.0 and ipv6 to inet6.0
For this example you need to assign the policy to the peer group. They are not automatically assigned by name but explicity assigned in the bgp group stanza and you need to declare the BGP type as external.
https://www.juniper.net/documentation/en_US/junos/topics/example/policy-bgp-levels.html
2)set policy-options policy-statement JOO term 1 from route-filter 0.0.0.0/0 orlonger
will above policy will match all routes?
Yes, but you also need to add the then accept line
3) Deos EX4300 support BGP?
BGP is an additional license feature for the ex4300
https://www.juniper.net/us/en/local/pdf/datasheets/1000467-en.pdf