text: Find the number of Chicks in a Zoo at Nth day | Java implementation of the approach ; Function to return the number of chicks on the nth day ; Driver code
code: import java . io . * ; class GFG { static int getChicks ( int n ) { int chicks = ( int ) Math . pow ( 3 , n - 1 ) ; return chicks ; } public static void main ( String [ ] args ) { int n = 3 ; System . out . println ( getChicks ( n ) ) ; } }