Virtusa interview question

What are access specifers in java,sql command to retrieve the 2nd latgest salary