Condition to check that two numbers are in golden ratio
if ( ratio1 . equals ( ratio2 ) && ratio1 . equals ( "1.618" ) ) { System . out . println ( " Yes " ) ; return true ; } else { System . out . println ( " No " ) ; return false ; } }