[Java Programming] 배열 배우기 _ 2, Array_2


public class Application{

public static void main(String[] args){

String[] fruits = {'Apple', 'orange', 'banana'};

System.out.println(fruits[0]);


for(String text : fruits){

    System.out.println(text);

}

}

}


[result]

Apple

Apple

orange

banana

+ Recent posts