Where does the rest of the codes went to? [noob question]

You know when you write a functions you write the codes inside the bracket?

private function test():void{
//codes go in here
}

But on some codes i see, they write the codes just like below

private function test():void

so where does the rest of the code is placed at, and how do they link them?
is this a better way to write the codes?