declaration and initialization

1 topic · 1 source

Technology› Programming

Java

A statement in which a variable is declared and immediately given its initial value. Three examples of declaration and initialization are

 int numStudents = 23; Ship argo = new Ship(); Student[] students = new Student[numStudents]; 
Instance variables that are not explicitly initialized when they are declared have a default initial value that is appropriate to their type. Uninitialized local variables have an undefined initial value.

Cite this definition

APA
MLA
Chicago