Multiple Choice Question

Quiz Guidelines

 

QID: 
528
Question: 

Consider the following method 

public float parseFloat( String s ){ 
  float f = 0.0f;   try{      
f = Float.valueOf( s ).floatValue();   
   return f ;   }  
 catch(NumberFormatException nfe){    
  f = Float.NaN ;     
 return f;   }   
finally{   
   f = 10.0f;     
 return f;   } }

What will it return if the method is called with the input "0.0" ?

Select 1 option 

A. It will not compile. 
B. It will return 10.0 
C. It will return Float.Nan 
D. It will return 0.0 
E. None of the above.

Q&A Set: 

Search the Web

Custom Search

Searches whole web. Use the search in the right sidebar to search only within javajee.com!!!