Initializing variables with assignment statements - Java Language Basics

Java examples for Language Basics:Variable


Assignment statements have this general form:

variable = expression;

Demo Code

public class Main {
  public static void main(String[] args) {
    int i;// ww w.  j a  va  2 s .  c  om
    i = 0;
    System.out.println("i is " + i);


Related Tutorials