All pastes #791229 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-11-20 20:14 UTC
rendered paste body
import java.util.*;
public class Run
{
    public static void main(String[] args)
    {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter numbers: ");
        String str1 = input.nextLine();
        String[] str2 = str1.split(" ");
        
        int[] numbers = new int[str2.length];
        
        for (int i=0; i<=str2.length; i++) 
            numbers[i] = Integer.parseInt(str2[i]);
        
       if (checkCard(numbers.length)) //successful
       //else fail
   }    
  
        public static boolean checkCard(int num)
    {       
        return (num > 5 || num <= 0) ? false : true;
                   
    }
        
}