java casting confusion
        Posted  
        
            by Stardust
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Stardust
        
        
        
        Published on 2010-03-12T19:20:58Z
        Indexed on 
            2010/03/12
            19:27 UTC
        
        
        Read the original article
        Hit count: 406
        
Could anyone please tell me why the following casting is resulting in compile time error:
Long l = (Long)Math.pow(5,2);
But why not the following:
long l = (long)Math.pow(5,2);
© Stack Overflow or respective owner