Programming Examples

Java program to design a class to overload a function compare for int char and string


Design a class to overload a function compare() as follows:

(a) void compare(int,int) - to compare tow integer values and print the greater of the tow integers.

(b) void compare(char,char) - to compare the numeric value of tow character with higher numeric value.

(c) void compare(String,String) - to compare the length of the tow strings and print the longer of the two.

Output

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz