Initializing variables with assignment statements - Java Language Basics

Java examples for Language Basics:Variable

Introduction

Assignment statements have this general form:

variable = expression;

Demo Code

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

}

Related Tutorials