I downloaded the Oracle SQLDeveloper, but when I opened it, it said that it requires a minimum of Java 8 and gave me the website for the download. I went on and downloaded Java
After unzipping the mac sqldeveloper.zip file, you will find the SQLDeveloper.app file.
Copy the SQLDeveloper.app to Applications folder. Later execute the below command in terminal.
xattr -d com.apple.quarantine /Applications/SQLDeveloper.app