Virtusa Interview Question

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