Name the type of error that occurs for the following statement:

System.out.printIn(Math.sqrt(24 - 25));
  1. Syntax error
  2. runtime error
  3. logical error
  4. no error


Solution



(c)
logical error

Explanation:

Math.sqrt(24-25)
and, √-1   = imaginary
i.e, a logical error


Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com