Write a program to add integer value, JAVA Programming

Assignment Help:

Write a program to add integer value?

class AddInts {
public static void main (String args[]) {
int i = 1;
int j = 2;
System.out.println("i is " + i);
System.out.println("j is " + j);
int k = i + j;
System.out.println("i + j is " + k);
k = i - j;
System.out.println("i - j is " + k);
}
}
Here's what happens while you run AddInts:
$ javac AddInts.java
$ java AddInts
i is 1
j is 2
i + j is 3
i - j is -1


Related Discussions:- Write a program to add integer value

Development build to production server tomcat, Move development build to pr...

Move development build to production server tomcat Project Description: Move our development build and integrate with MYSQL database, to our production vps. The software i

Explain arithmetic promotion and binary operations, Explain Arithmetic Prom...

Explain Arithmetic Promotion and Binary Operations? An int divided through an int is an int, and a double divided by a double is a double, but what about an int divided by a do

Develop wechat program to integrate with sugarcrm, Wechat and SugarCRM P...

Wechat and SugarCRM Project Description: Seeking the partner able to develop wechat program to integrate with SugarCRM. Wechat Official Account able to perform some functi

I want crime management website, I want Crime Management website Project...

I want Crime Management website Project Description: It is a web based project build in J2EE as front end and Oracle as back end for peoples so they will register complaints

Area under curve, java code for finding area under curve y=f(x) between x=a...

java code for finding area under curve y=f(x) between x=a and a=b integrate y=f(x) between the li,its of a and b. the area under a curve between two points can be found by doing a

Describe tostring() methods, Describe toString() Methods ? Print method...

Describe toString() Methods ? Print methods are general in some languages, but most Java programs operate differently. You can use System.out.println() to print any object. The

Annotation or attribute oriented programming? , Annotation or Attribute ori...

Annotation or Attribute oriented programming There are two types of code generation processes. Passive code generation: is template driven . Input process are used in mo

Explain how several ways businesses monitor their employees, Explain how se...

Explain how several ways businesses monitor their employees? Systems are available in which monitor or most every key stroke which an employee forms on computer. Systems are av

Use of unicastremoteobject in rmi, What is the use of UnicastRemoteObject i...

What is the use of UnicastRemoteObject in RMI? Ans) The UnicastRemoteObject class gives support for point-to-point active object references using TCP streams. Objects that need

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd