tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Tools and Libs > Google Guava > Primitives > Booleans as List

Booleans as List 

Google Guava is a java library with lot of utilities and reusable components. This requires the library guava-10.0.jar to be in classpath. The following example shows using Booleans.asList() API.

File Name  :  
Author  :  Sudhakar KV
Email  :  [email protected]
package com.bethecoder.tutorials.guava.primitive_tests;

import java.util.List;


public class BooleanListTest {

   @param args
  public static void main(String[] args) {
    List<Boolean> boolList = Booleans.asList(true, false, false, true);


It gives the following output,
[true, false, false, true]


bl  br