Skip to main content

Basic Program: WAP to print difference of 20 &60

Print Difference of 20&60

import java.util.*;
class java
{
public static void main()
{
int a,b,c;
a=20;
b=60;
c=a-b;
System.out.println(c);
}
}

Explanation:-

Packages:-
1. import java.util
2. public static void main()

Defining Class
1. class java:- it is used to define class in JAVA
2. (;) to end the specific line
3. System.out.println(c): to give the output of the program
4. "{" it is for opening the program
5. "}" used to close the program

Comments

Popular posts from this blog