Is my logic correct?

public boolean structurallyIdentical(BinaryTree other) {
return this.structurallyIdentical(this.root, other.root);
}

	private boolean structurallyIdentical(Node tnode, Node onode) {
		if(tnode==null && onode==null){
			return true;
		}
		if(tnode!=null && onode!=null){
			return (tnode.data==onode.data && structurallyIdentical(tnode.left,onode.left) &&  structurallyIdentical(tnode.right,onode.right));
		}else{
			return false;
		}
	}

@karamjitverma89,

Remove:

tnode.data==onode.data from the return statement.

@karamjitverma89 ,
I have attached the code with the changes and it works perfectly: https://ide.geeksforgeeks.org/4tQyMyHse5