ICSE Practice test 3 class X : Top Questions
Sample Input: 15390Sample output: Sum of digits=18 Define a class student having the following description
Watch Java videos
In this ICSE practice test all the topics of java for ICSE computer application has been covered.
Create a class with one integer instance variable. Initialize the variable using [2]
- Default constructor
- Parameterized constructor.
State two features of a constructor. [2]
What is a static function? [1]
Write a function to find the sum of the digits of an integer that is input. [10]
Sample Input: 15390
Sample output: Sum of digits=18
Define a class student having the following description
Data members
String name-> to store name
int roll-> to store roll no.
int p,c,b-> to store physics, chemistry ,bio marks
double avg-> to store average of science marks
Member function
Input()-> to accept details of student from user
Calculate()-> to calculate science marks
Display()-> to display name, rollno, science marks, average
String Handling
Related Posts
Continue learning with these related articles

String Methods in Java for ICSE Class 10: 25 Output Questions with Answers
ICSE Class 10 Computer Applications practice on String class methods: length, charAt, indexOf, lastIndexOf, substring, replace, trim, compareTo, equals and more, with 25 board-style output questions and step-by-step answers.

Special Number Programs in Java for ICSE: Armstrong, Spy, Neon, Disarium, Pronic and More
Every special number asked in ICSE Computer Applications – prime, perfect, Armstrong, palindrome, automorphic, neon, spy, Niven, duck, buzz, Disarium, special and pronic numbers – with definitions, examples and one complete Java program that checks them all.

Math Library Methods in Java for ICSE Class 9 (with Outputs)
ICSE Class 9 Computer Applications notes on the Java Math class: sqrt, cbrt, pow, abs, max, min, ceil, floor, round, rint and random, with return types, tricky negative-number outputs and Java expressions for formulas.