Java[030] – Vetores/Arrays em Java | Parte 1

Introdução a vetores em Java.
Introdução array em Java.


package aulas;

public class Aula_30 {
 public static void main(String[] args){

 int numAlunos = 5;
 double[] notaAlunos = new double[numAlunos];

 notaAlunos[0] = 6.7;
 notaAlunos[1] = 5.7;
 notaAlunos[2] = 7.8;

 System.out.println(notaAlunos[2]);

 }
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s