Driver code
public static void main ( String [ ] args ) { int a [ ] = { 0 , 1 , 0 , 1 } ; int n = a . length ; if ( check ( a , n ) == true ) System . out . println ( "YESNEW_LINE") ; else System . out . println ( "NONEW_LINE"); } }