guys! can you help me convert this code to java language....
this is my code in c++....i need to convert in java....
# include <iostream.h>
int num1,num2,sum;
double add(double sum);
int main()
{
cout<<"Enter first number";
cin>>num1;
cout<<"Enter second number";
cin>>num2;
sum=add(sum);
cout<<"The sum is: "<< sum;
return 0;
}
double add(double sum)
{
return (sum=num1+num2);
}
}