Professional Documents
Culture Documents
9 Icse Cs Half Yearly Exam
9 Icse Cs Half Yearly Exam
Question 2: [10M]
b) Define package.
c) List out the types of program errors.
d) Name the methods of scanner class that,
(i) is used to input an integer data from the standard input stream.
(ii) is used to input a string data from the standard input stream.
(iii) Math.cbrt(64.0)
(iv) Math.sqrt(36.0)
b) Write a program that calculate sum of four numbers 7.9, 2.3, 8.8, and 13.5
Question 5: [15m]
Question 7: [15m]
a) Explain the scope of variable and explain with the java program.
b) Write a program that invokes a method testodd(). The method testodd if the
passed number is odd otherwise returns false.
Question 8: [15m]
Question 9: [15m]
Explain 10 basic function of java.lang Math class in java with their simple java
snippet.