Wednesday, December 7, 2016

Comma separated

This code is taken from the presentation of Java One keynote. The link of which is posted below the code.

Problem: Print the name of your five friends stored in an ArrayList in upper case comma separated.

import java.util.*;
import static*;

public class ArrayListExamples {
  public static void main(String[]args){
  Listnames = Arrays.asList("Tom","Jerry","Jane","Jack");
  //print the names in uppercase, comma separated

No comments: