# Addition of Two Numbers Using Spring Framework

Email
 Submitted on: 5/1/2016 1:04:50 PM By: Jake R. Pomperada Level: Beginner User Rating: Unrated Compatibility: Java (JDK 1.5) Views: 8276

I am very new in Java Enterprise Edition or J2EE programming particularly using Spring Framework. But I find it easy to learn once you have known the basic concepts and principles behind it. I am thankful that there is a video tutorial in YouTube that we can study to be specific the tutorial of Ankush Gorav here his website http://www.gontu.org. I have learned a lot from his tutorial in YouTube. In gives me an idea how to get started this sample program that I wrote is based on his tutorial will ask the user to give two numbers and then our program will find the total sum of the two numbers. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com My mobile number here in the Philippines is 09173084360.

code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 ``` //************************************** // Name: Addition of Two Numbers Using Spring Framework // Description:I am very new in Java Enterprise Edition or J2EE programming particularly using Spring Framework. But I find it easy to learn once you have known the basic concepts and principles behind it. I am thankful that there is a video tutorial in YouTube that we can study to be specific the tutorial of Ankush Gorav here his website http://www.gontu.org. I have learned a lot from his tutorial in YouTube. In gives me an idea how to get started this sample program that I wrote is based on his tutorial will ask the user to give two numbers and then our program will find the total sum of the two numbers. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com My mobile number here in the Philippines is 09173084360. // By: Jake R. Pomperada //************************************** Addition_Two_Numbers.java package org.gontuseries.springcore; import java.util.Scanner; public class Addition_Two_Numbers { int a=0,b=0,sum=0; public void find_sum() { Scanner in = new Scanner(System.in); System.out.println(); System.out.println("Addition of Two Numbers"); System.out.println("\n"); System.out.print("Enter First Value : "); a = in.nextInt(); System.out.print("Enter Second Value : "); b = in.nextInt(); sum=(a+b); System.out.println("\n"); System.out.print("The sum of " + a + " and " + b + " is " + sum +"."); System.out.println("\n"); System.out.println("End of Program"); } } SpringConfig.xml TestSpringProject.java package org.gontuseries.springcore; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class TestSpringProject { public static void main(String[] args) { @SuppressWarnings("resource") ApplicationContext context = new ClassPathXmlApplicationContext("SpringConfig.xml"); Addition_Two_Numbers Add_Two_NumbersObj = (Addition_Two_Numbers) context.getBean("addition_two_numbers_Bean"); Add_Two_NumbersObj.find_sum(); } } ```

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

There are no comments on this submission.

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.