figure graph used by dfs java and bfs java the dfs java program listing shows the dfs java programwhich includes the dfs(method it includes version of the stackx class from "stacks and queues listing the dfs java program /dfs java /demonstrates depth-first search /to run this programc>java dfsapp ///////////////////////////////////////////////////////////////class stackx private final int size private int[stprivate int top/public stackx(/constructor st new int[size]/make array top - /public void push(int /put item on stack st[++topj/public int pop(/take item off stack return st[top--]/public int peek(/peek at top of stack