How To Find Time Complexity In Java