Java applets run on a JVM that check code's integrity and correctness before execution using a module called bytecode verifier. Large memory space requirements of the verification process blocks implementation of a bytecode verifier embedded in the Java smart card. To address this feasibility problem, the paper desinged a new verification algorithm that optimizes the use of Java smart card's memory and CPU. The algorithm, inspired to DBG (directed branch graph), is DAG (directed acyclic graph) based and cache-policy-based. As per our lab test, our DAG algorithm has much better performance than DBG algoritm.