no title...

Page 34

Initialize by Dynamics Initializing a variable by dynamics does not assign a specific value to a variable. Instead, values subject to change are assigned to the variables. Occasionally, values that change are values from an Application Under Test (AUT) or other variables. The following is a variable initialization by dynamics example:

public class VariableExample { public static void main(String[] args) { int num1, num2; num1 = 100; num2 = 200; int total = num1 + num2; System.out.println("The total of num1 and num2 is " + total); } }

Figure 2.7 – Initialize by Dynamics


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.