how to take user input in Array using java?

前端 未结 8 1679
你的背包
你的背包 2020-12-03 12:35

how to take user input in Array using Java? i.e we are not initializing it by ourself in our program but the user is going to give its value.. please guide!!

8条回答
  •  攒了一身酷
    2020-12-03 13:02

    import java.util.Scanner;

    class Example{

    //Checks to see if a string is consider an integer.

    public static boolean isInteger(String s){
    
        if(s.isEmpty())return false;
    
        for (int i = 0; i 

    }

提交回复
热议问题