Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while(size < 0){
- Scanner input = new Scanner(System.in);
- System.out.println("Size is too small, please input a number bigger than 0.");
- if(input.hasNextInt()){
- size = input.nextInt();
- }
- input.close();
- }
- array = new int[size];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement