public static void main(String[] args) {
String[] array = new String[4];
System.out.println("Type 3 Strings:");
Scanner input = new Scanner(System.in);// User input
for (int i = 0; i < 3; i++) // used for loop for user input
{
array[i] = input.nextLine(); // Assigned users value to array
}
System.out.println("Your Strings are:");
System.out.println(array[0]);
System.out.println(array[1]);
System.out.println(array[2]);
}
Now I want to find a random character set from array, the Random characters are also maximum (input string length-1). Then store the Random characters into another Array. What to do next Please help me.
Aucun commentaire:
Enregistrer un commentaire