Chinese people often use this expression.
The old-fashioned method is much more complex. In ancient China, there are lot of form of addresses like modest words, taboo words, circuitous words and prefixes.
A comment mentioned 年轻人 你好 , I do NOT recommend to say something like this to a young man especially if you are young. Because improper usage makes you like an old man, talking to a little child, they'll feel offended.
However, if you are old enough , it's safe and even makes the atmosphere more relaxed.
One mentioned 嘿(hei,hey)，it's only safe to foreigner to say. Chinese won't use the word to start a conversion between strangers in real life except for somebody just wanted to draw one's attention in a direct way.
Today in China, apart from the answers, different regions in China have different expressions.
你好(Nihao) is too ordinary for a foreigner. We can use some regional expression.
- In most part of China especially northeast we can call a man 兄弟（XiongDi,brother）
- In most part of China like Shandong we can call a man 师傅(ShiFu,master worker)
- In JiangXi，GuiZhou we can call a man 老表(LaoBiao,cousion)
- In SiChuan, ChongQing we can call a man 哥子(GeZi,brother)
When you talk to a female, remember not to call she 小姐(XiaoJie),though in formal occasion we use the expression to refer to a young girl.
Because in recent years the word attached another meaning which means pro sti tute.
We'd better to make them sounds younger if you are not certain about her name.
- A madam you can call her 大姐（Dajie， elder sister）
- A girl you can call her 姑娘（GuNiang）
- An old lady you can call her 大妈(Dama)， also can be 大娘(DaNiang) but not so universal
Besides, we can call a young man 帅哥（ShuaiGe，Handsome guy），a girl even a madam（MeiNv，beautiful girl） around China.
In GuangDong here is a pair of expression has the same meaning: 靓仔（cool guy），靓女（cool girl）.
With the expressions above, you can start a talk without saying 你好：
帅哥，西湖该怎么走？（Guy，how can I get to the West Lake ?）
师傅，你知道哪里有加油站吗？（Master worker，do you know where is the gas station?）
美女，你能帮我看看这个字怎么读么?(Beautiful girl,will you (please) help me find out how to pronounce the word? )
The most important thing is speak naturally, if you speak not fluently, it's embarrassing to repeat many times.