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   www.  j av a 2  s  .  co  m*/
    i = 0;
    System.out.println("i is " + i);
  }

}

Related Tutorials