Find the count of natural Hexadecimal numbers of size N | Java implementation of the approach ; Function to return the count of n - digit natural hexadecimal numbers ; Driver code
class GFG { static int count ( int n ) { return ( int ) ( 15 * Math . pow ( 16 , n - 1 ) ) ; } public static void main ( String args [ ] ) { int n = 2 ; System . out . println ( count ( n ) ) ; } }