To get the balance of tokens for an account, you can submit an account balance query. The account balance query will return the tokens the account holds in a list format.
Query Fees
Please see the transaction and query fees table for the base transaction fee
//Create the queryAccountBalanceQuery query =newAccountBalanceQuery().setAccountId(accountId);//Sign with the operator private key and submit to a Hedera networkAccountBalance tokenBalance =query.execute(client);System.out.println("The token balance(s) for this account: "+tokenBalance.tokens);//v2.0.9
//Create the queryconstquery=newAccountBalanceQuery().setAccountId(accountId);//Sign with the client operator private key and submit to a Hedera networkconsttokenBalance=awaitquery.execute(client);console.log("The token balance(s) for this account: "+tokenBalance.tokens.toString());//v2.0.7
//Create the queryquery := hedera.NewAccountBalanceQuery().SetAccountID(accountId)//Sign with the client operator private key and submit to a Hedera networktokenBalance, err := query.Execute(client)if err !=nil {panic(err) }fmt.Printf("The token balance(s) for this account: %v\n", tokenBalance)//v2.1.0