The Dividing Fences Act 1961 defines a "sufficient fence" as one which must resist the trespass of cattle or sheep, or as determined by a magistrate. We have moved on a little since then, but the premise is that the fence must be sufficient.
The Act makes no mention of walls, but some councils have Local Laws which overlay the Act and clearly define if gates and walls are included in their definitions.
Crown Land is exempted from the DFA 1961. Therefore, where the adjoining land parcel is a road, laneway, park, or footpath for example, the neighbouring land owner must pay 100% of the fencing maintenance and replacement costs.