Reset author name to chosen name ✨
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||
*/
|
||||
package lab15_chloefontenot;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author chloe
|
||||
*/
|
||||
public class Array2 {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
String[] names1 = {"John", "Bill", "George"};
|
||||
String[] names2 = new String[3];
|
||||
|
||||
names2[0] = "Mary";
|
||||
names2[1] = "Ann";
|
||||
names2[2] = "Lola";
|
||||
|
||||
/*
|
||||
System.out.println(names1[2]);
|
||||
System.out.println(names2[2]);
|
||||
*/
|
||||
for (int i = 0; i < names1.length; i++) {
|
||||
System.out.println(names1[i]);
|
||||
System.out.println(names2[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user