Tutorial
Friday, 6 January 2012
# Write a program to add two numbers using function in java
class add
{
void add1 (int x,int y)
{
int c=x+y;
System.out.println("The Result is:" +c);
}
}
class main
{
public static void main(String args[])
{
add a=new add();
a.add1(2,3);
}
}
2 comments:
Unknown
13 December 2018 at 10:39
very nice
Reply
Delete
Replies
Reply
Pawan kumar
28 June 2019 at 23:18
specialcomputergyan.blogspot.com
Reply
Delete
Replies
Reply
Add comment
Load more...
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
very nice
ReplyDeletespecialcomputergyan.blogspot.com
ReplyDelete