Example 6 - Variable Declaration

Question

ADDQUESTION

Solution

/**
 * Example 6 Variable Declaration
 */

class VariableDeclaration {

  public static void main(String[] args) {
    int a, b, c;
    int x = 1, y = 2, z = 3;
    int ratio = z/x;
    final double PI = 3.141592653589;
    boolean found = false;
    final int maxyz;
    if (z > y)
      maxyz = z;
    else
      maxyz = y;
  }


}
Run this
Comments by Disqus