Try-Catch block paradox

Discussion in 'School Work Help' started by Dan, Jun 10, 2010.

  1. what will this method return?

    Code:
    // does this function return true? or does it return false?
    public bool paradox() {
    	try {
    		return false;
    	} 
    	finally {
    		return true;
    	}
    }
     
  2. it would return true... because it would run through the try and be given a false, forcing the finally block to execute.
     
  3. honestly, i don't know the answer to this lol

    i'm thinking it returns a nullpointer somewhere.....