Loading...
Design a class to overload a method Number( ) as follows: (i) void Number (int num , int d) - To count and display the frequency of a digit in a number. Example: num = 2565685 d = 5 Frequency of digit 5 = 3 (ii) void Number (int n1) - To find and display the sum of even digits of a number. Example: n1 = 29865 Sum of even digits = 16 Write a main method to create an object and invoke the above methods.
Give the output of the following program segment: int n = 4279; int d; while(n>0) {d=n%10; System.out.println(d); n=n/100; }
© 2026 PadhAiPro. This question is provided for educational purposes.