SlideShare a Scribd company logo
//Ques. 8 WAP on function overloading?

class sum
{
void add(inta,int b)
{
System.out.println("nSum is: "+(a+b));
}
void add(inta,intb,int c)
{
System.out.println("Sum is: "+(a+b+c));
}
void add(inta,float b)
{
System.out.println("Sum is: "+(a+b));
}
}
class overloading
{
public static void main(String arg[])
{
sum c=new sum();
c.add(5,4);
c.add(29,33,22);
c.add(6,4f);
}
}
OUTPUT:-

More Related Content

What's hot (20)

PDF
Some Commonly asked Function/Objects Vs. header files (CBSE 12th Exam)
indiangarg
 
PPTX
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
DOC
Shan
mohdshanu
 
PDF
C programs Set 2
Koshy Geoji
 
PDF
Optimizing the Grafana Platform for Flux
InfluxData
 
TXT
Simulador carrera de caballos desarrollado en C++
Santiago Sarmiento
 
PDF
Goの時刻に関するテスト
Kentaro Kawano
 
TXT
Uts
pencari buku
 
ODP
Use of django at jolt online v3
Jaime Buelta
 
PPTX
Using Grafana with InfluxDB 2.0 and Flux Lang by Jacob Lisi
InfluxData
 
PPTX
Queue oop
Gouda Mando
 
DOCX
Wap to implement bitwise operators
Harleen Sodhi
 
PDF
Write a program to show the example of hybrid inheritance.
Mumbai B.Sc.IT Study
 
PDF
Om (Cont.)
Taku Fukushima
 
DOCX
Java Code for Sample Projects Methods
jwjablonski
 
DOCX
Array using recursion
Swarup Boro
 
PDF
Mangling Ruby with TracePoint
Mark
 
PDF
Activity Recognition Through Complex Event Processing: First Findings
Sylvain Hallé
 
DOC
Labsheet_3
rohassanie
 
Some Commonly asked Function/Objects Vs. header files (CBSE 12th Exam)
indiangarg
 
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
 
Shan
mohdshanu
 
C programs Set 2
Koshy Geoji
 
Optimizing the Grafana Platform for Flux
InfluxData
 
Simulador carrera de caballos desarrollado en C++
Santiago Sarmiento
 
Goの時刻に関するテスト
Kentaro Kawano
 
Use of django at jolt online v3
Jaime Buelta
 
Using Grafana with InfluxDB 2.0 and Flux Lang by Jacob Lisi
InfluxData
 
Queue oop
Gouda Mando
 
Wap to implement bitwise operators
Harleen Sodhi
 
Write a program to show the example of hybrid inheritance.
Mumbai B.Sc.IT Study
 
Om (Cont.)
Taku Fukushima
 
Java Code for Sample Projects Methods
jwjablonski
 
Array using recursion
Swarup Boro
 
Mangling Ruby with TracePoint
Mark
 
Activity Recognition Through Complex Event Processing: First Findings
Sylvain Hallé
 
Labsheet_3
rohassanie
 

Viewers also liked (8)

PPTX
Overloading
gemini1420
 
PPTX
12. session 12 java script objects
Phúc Đỗ
 
PDF
Inside Javascript Objects
anandology
 
DOCX
Constructor Overloading in java
One97 Communications Limited
 
PPT
Sankar.presentation1.accountancy
Rohitbhakta
 
PPT
Java Programming - Introduction to Abstract Class
Oum Saokosal
 
PDF
बेसिक जावा प्रोग्रामिंग हिंदी में
Chand Rook
 
PPT
Introduction to Basic Accounting Concept
Kamrul Hasan
 
Overloading
gemini1420
 
12. session 12 java script objects
Phúc Đỗ
 
Inside Javascript Objects
anandology
 
Constructor Overloading in java
One97 Communications Limited
 
Sankar.presentation1.accountancy
Rohitbhakta
 
Java Programming - Introduction to Abstract Class
Oum Saokosal
 
बेसिक जावा प्रोग्रामिंग हिंदी में
Chand Rook
 
Introduction to Basic Accounting Concept
Kamrul Hasan
 
Ad

More from One97 Communications Limited (20)

DOCX
Er. Model Of Hospital Management
One97 Communications Limited
 
DOCX
Fcfs Cpu Scheduling With Gantt Chart
One97 Communications Limited
 
PPTX
Neural Interfacing
One97 Communications Limited
 
PPT
Blue eye technology
One97 Communications Limited
 
PPTX
Computer Forensics
One97 Communications Limited
 
PPTX
Protect Folders without using any Software
One97 Communications Limited
 
PPTX
Introduction to Java Programming
One97 Communications Limited
 
DOCX
WAP to invoke constructors using super keyword in java
One97 Communications Limited
 
DOCX
WAP to find out whether the number is prime or not in java
One97 Communications Limited
 
DOCX
Overriding abstract in java
One97 Communications Limited
 
DOCX
How to achieve multiple inheritances by using interface in java
One97 Communications Limited
 
DOCX
Method overriding in java
One97 Communications Limited
 
DOCX
WAP to implement inheritance and overloading methods in java
One97 Communications Limited
 
DOCX
Program on usage of Final keyword in java
One97 Communications Limited
 
DOCX
WAP to initialize different objects with different values in java
One97 Communications Limited
 
Er. Model Of Hospital Management
One97 Communications Limited
 
Fcfs Cpu Scheduling With Gantt Chart
One97 Communications Limited
 
Neural Interfacing
One97 Communications Limited
 
Blue eye technology
One97 Communications Limited
 
Computer Forensics
One97 Communications Limited
 
Protect Folders without using any Software
One97 Communications Limited
 
Introduction to Java Programming
One97 Communications Limited
 
WAP to invoke constructors using super keyword in java
One97 Communications Limited
 
WAP to find out whether the number is prime or not in java
One97 Communications Limited
 
Overriding abstract in java
One97 Communications Limited
 
How to achieve multiple inheritances by using interface in java
One97 Communications Limited
 
Method overriding in java
One97 Communications Limited
 
WAP to implement inheritance and overloading methods in java
One97 Communications Limited
 
Program on usage of Final keyword in java
One97 Communications Limited
 
WAP to initialize different objects with different values in java
One97 Communications Limited
 
Ad

Recently uploaded (20)

DOCX
MUSIC AND ARTS 5 DLL MATATAG LESSON EXEMPLAR QUARTER 1_Q1_W1.docx
DianaValiente5
 
PPTX
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
PDF
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
PPTX
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
PDF
VCE Literature Section A Exam Response Guide
jpinnuck
 
PPTX
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
PPTX
How Physics Enhances Our Quality of Life.pptx
AngeliqueTolentinoDe
 
PPTX
2025 Completing the Pre-SET Plan Form.pptx
mansk2
 
PPTX
Photo chemistry Power Point Presentation
mprpgcwa2024
 
PPTX
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
 
PDF
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
PPTX
How to use grouped() method in Odoo 18 - Odoo Slides
Celine George
 
PDF
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
PPT
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
DOCX
ANNOTATION on objective 10 on pmes 2022-2025
joviejanesegundo1
 
PPTX
How to use _name_search() method in Odoo 18
Celine George
 
PDF
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
PDF
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
PPTX
How to Add New Item in CogMenu in Odoo 18
Celine George
 
PDF
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 
MUSIC AND ARTS 5 DLL MATATAG LESSON EXEMPLAR QUARTER 1_Q1_W1.docx
DianaValiente5
 
Aerobic and Anaerobic respiration and CPR.pptx
Olivier Rochester
 
Rapid Mathematics Assessment Score sheet for all Grade levels
DessaCletSantos
 
How to Configure Taxes in Company Currency in Odoo 18 Accounting
Celine George
 
VCE Literature Section A Exam Response Guide
jpinnuck
 
Iván Bornacelly - Presentation of the report - Empowering the workforce in th...
EduSkills OECD
 
How Physics Enhances Our Quality of Life.pptx
AngeliqueTolentinoDe
 
2025 Completing the Pre-SET Plan Form.pptx
mansk2
 
Photo chemistry Power Point Presentation
mprpgcwa2024
 
ENGLISH -PPT- Week1 Quarter1 -day-1.pptx
garcialhavz
 
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
How to use grouped() method in Odoo 18 - Odoo Slides
Celine George
 
CAD25 Gbadago and Fafa Presentation Revised-Aston Business School, UK.pdf
Kweku Zurek
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
ANNOTATION on objective 10 on pmes 2022-2025
joviejanesegundo1
 
How to use _name_search() method in Odoo 18
Celine George
 
DIGESTION OF CARBOHYDRATES ,PROTEINS AND LIPIDS
raviralanaresh2
 
THE PSYCHOANALYTIC OF THE BLACK CAT BY EDGAR ALLAN POE (1).pdf
nabilahk908
 
How to Add New Item in CogMenu in Odoo 18
Celine George
 
Andreas Schleicher_Teaching Compass_Education 2040.pdf
EduSkills OECD
 

program on Function overloading in java

  • 1. //Ques. 8 WAP on function overloading? class sum { void add(inta,int b) { System.out.println("nSum is: "+(a+b)); } void add(inta,intb,int c) { System.out.println("Sum is: "+(a+b+c)); } void add(inta,float b) { System.out.println("Sum is: "+(a+b)); } } class overloading { public static void main(String arg[]) { sum c=new sum(); c.add(5,4); c.add(29,33,22); c.add(6,4f); } }