Java examples for javafx.collections:ObservableList
unmodifiable ObservableList
//package com.java2s; import java.util.Arrays; import java.util.Collections; import javafx.collections.FXCollections; import javafx.collections.ObservableList; public class Main { public static void main(String[] argv) { String array = "java2s.com"; System.out.println(unmodifiableList(array)); }/* w ww . j av a2 s.c o m*/ public static ObservableList<String> unmodifiableList(String... array) { return FXCollections.observableArrayList(Collections .unmodifiableList(Arrays.asList(array))); } }