Created
July 18, 2019 02:56
-
-
Save wukaihua119/36cf4617fe28954fd54b6cc31f26b154 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Thirty; | |
import java.util.Arrays; | |
import java.util.ArrayList; | |
import java.util.List; | |
public class Main{ | |
public static void main( String [] args ){ | |
//ArrayList lists = new ArrayList( Arrays.asList( 12, 98, 32, 0, -1, 56, 0 ) ); | |
List lists = Arrays.asList( 12, 98, 32, 0, -1, 56, 0 ); | |
if( lists.contains( 0 ) && lists.contains( -1 ) ) | |
System.out.println( "This array contains 0 and -1" ); | |
else | |
System.out.println( "This array doesn't contains 0 and -1" ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment