Fibonacci problem ( Value of Fib ( N ) * Fib ( N ) | Java implementation of the approach ; Driver code
import java . io . * ; class GFG { static int getResult ( int n ) { if ( ( n & 1 ) > 0 ) return 1 ; return - 1 ; } public static void main ( String [ ] args ) { int n = 3 ; System . out . println ( getResult ( n ) ) ; } }