Don't be afraid of the area. Is Flatbush and East New York rough? Yes. But most of its reputation preceeds itself from the legendary, or infamous days, of the 80s and 90s. NYC in general is a much safer place, and when you compare crime statistics to other 'large' cities (Philly, Oakland, NOLA, Chicago, etc) it is significantly better. It might be bias from being a native New Yorker, or familiarity with the area, but I've never been afraid of walking down a street at night while listening to music or talking on the phone, which is not something I would do in Philly. Be mindful though, that I'm still paying attention to my surroundings, but I feel that's something you should do anywhere you are. I wouldn't recommend doing that in the area around Downstate obviously, as others have mentioned, but just hoping to allay any fears you have of the "big city".
So long as you act comfortable, are aware of your surroundings, and don't do anything to purposely stand out you should be fine. Don't walk around alone at night by downstate, at least at first. Keep in mind though that crime can happen anywhere. When I was working in Buffalo at a large tertiary care center with its own security patrols, someone was robbed at gun point in front of a restuarant around the corner from the hospital. It happens. You can't let yourself be consumed by it, but don't let your guard down either, just pay attention and live your life to the fullest.
I don't mean to mitigate the reality of Flatbush and East New York though, since it is a tough area. But at the same time, I believe if you are cautious and mindful you will be fine. If you decide on downstate and are not used to a city atmosphere or Brooklyn, try moving a bit earlier if you're going to live in an apartment and get a feel for the city. Some the areas Trio listed are good starting points, albeit pricey in some cases, for someone coming from outside the five boroughs.