Question: COSC 2331 Lab 2- Variables Date Due: 9/3/18 Point Value: 10 Purpose The purpose of the lab is to learn how to use declare and

COSC 2331 Lab 2- Variables Date Due: 9/3/18 Point Value: 10 Purpose The purpose of the lab is to learn how to use declare and use simple variables and to perform simple arithmetic calculations in Java. Process Create a new Java application. You will modify the main method so that it deelares three variables. Assign different values to the first two variable. The third variable will hold the sum of the first two. The sum will then be displayed. When declaring your variable, use meaningful variable names! Inside the main method . Declare two integer variables . Use the initialization operator to initialize one variable to 5 .Use the assignment operator to initialize the second variable to 6 .Declare a third integer to hold the sum of the first two variablies . Sum the first two variables and assign them to the third one Use all three variables to create the following display: The sum of 5 plus 6 is 11 Turn in a copy of your code with its output as comments
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
