Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Homework HelpRSS Feeds

Program to declare and initialize Integer variables and print them on the Standard Output Device

Posted By: Mary Smith     Category: Java     Views: 2782

A Java Program to declare and initialize Integer variables and print them on the Standard Output Device.

Code for Program to declare and initialize Integer variables and print them on the Standard Output Device in Java

publicclass JAVA_002
 {


    publicstaticvoid main(String[] args)
    {
       int value_1=5;
       int value_2=10;

       long sum=0;

       sum=value_1+value_2;

       System.out.println("Value_1 = " + value_1);
       System.out.println("Value_2 = " + value_2);

       System.out.println("Sum = Value_1 + Value_2 = " + sum);
    }
 }
  
Share: 



Mary Smith
Mary Smith author of Program to declare and initialize Integer variables and print them on the Standard Output Device is from Tampa, United States.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!