1.WAP to perform addition of two given numbers 40 and 60 IN JAVA ONLY.
Answers
Answered by
1
class abc
{
void main()
{
System.out.println(40+60);
}
}
Hope it helps.
{
void main()
{
System.out.println(40+60);
}
}
Hope it helps.
shashi007:
thnx brio
Answered by
0
Answer:
public class Test
{
void myMethod( )
{
int num1, num2, sum ;
num1 = 40 ;
num2 = 60 ;
sum = num1 + num2 ;
System.out.println(" 2 given numbers are: ");
System.out.println( num1 ) ;
System.out.println( num2 ) ;
System.out.println( " Sum = " + sum ) ;
}
}
Output:
2 given numbers are:
40
60
Sum = 100
Java:
Java is a popular third-generation programming language, which can be used to do any of the thousands of things that a computer software can do. With the features it offers, Java has become the language of choice for internet and intranet applications. Java plays an important role for the proper functioning of many software-based devices attached to the network.
Similar questions
Math,
8 months ago
Math,
8 months ago
Computer Science,
8 months ago
Science,
1 year ago
English,
1 year ago
Math,
1 year ago
Social Sciences,
1 year ago