In: Computer Science
3. Write a Java program that generates a set of random strings from a given string of same length where no character is ever repeated and characters belong to the original string.
Examples
Input: “Hello World”
Output: “World oHlel”
//// run multiple times
import java.util.Scanner;
public class Main
{
public static void main(String[] args) {
Scanner sc=new
Scanner(System.in);
System.out.print("Input:");
String inp=sc.nextLine();
int random_number= ( (int)
(Math.random() *100) )% (inp.length());
String
out=inp.substring(random_number)+inp.substring(0,random_number);
System.out.print("Output:"+
out);
}
}