0% found this document useful (0 votes)
2 views1 page

Simple Java Addition Program

This Java program prompts the user to enter two integers. It calculates the sum of these integers and prints the result. The program utilizes the Scanner class for input handling.

Uploaded by

jenifer
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Simple Java Addition Program

This Java program prompts the user to enter two integers. It calculates the sum of these integers and prints the result. The program utilizes the Scanner class for input handling.

Uploaded by

jenifer
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

import [Link].

Scanner;
public class Demo{
public static void main(String args[]){
Scanner sc=new Scanner([Link]);
[Link]("Enter the First number:");
int a= [Link]();
[Link]("Enter the Second Number:");
int b= [Link]();
int sum = a+b;
[Link](a+b);
}}

You might also like