Computer Science, asked by Samar1111, 1 year ago

What are function?Explain in brief
In creating calculator using java

Answers

Answered by aasmi123
1
Functions mainly refers to the piece of code which performs some operations and operationally returns a value
Coding for making calculator is
Int no1, no2, sum;
no1=Integer.parseInt(tf1.getText());
no2=Integer.parseInt(tf2.getText());
sum=no1+no2;
tf3.setText(" "+sum);
Add labels and text fields as per your convenience

aasmi123: And same for other operators also just change the signs
Samar1111: good
aasmi123: yup
Similar questions