Computer Applications
Write the return types of the following library functions:
(a) isLetterOrDigit(char)
(b) replace(char, char)
Java Library Classes
9 Likes
Answer
(a) boolean
(b) String
Answered By
6 Likes
Related Questions
How many times will the following loop execute?
int x = 2, y = 50; do { ++x; y -= x++; } while (x <= 10); return y;If
int a[] = {7, 3, 4, 8, 9, 2};what are the values of x and y?(a) x = a[1] * a[0] + a[3]
(b) y = a.length
Define a class to accept a number and check whether the number is Neon or not. A number is said to be Neon if sum of the digits of the square of the number is equal to the number itself.
E.g.
Input: 9Output:
9 * 9 = 81, 8 + 1 = 9
9 is Neon number.Define a class Student described as below
Data members/instance variables
name, age, m1, m2, m3 (marks in 3 subjects), maximum, averageMember methods
(i) Student (…) : A parameterised constructor to initialise the data members.(ii) compute() : To compute the average and the maximum out of three marks.
(iii) display() : To display the name, age, marks in three subjects, maximum and average.
Write a main method to create an object of a class and call the above member methods.