Name the type of error that occurs for the following statement:
System.out.printIn(Math.sqrt(24 - 25));
- Syntax error
- runtime error
- logical error
- 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