Source code:
import java.util.*;
import java.io.*;
public class Main
{
public static void main(String[] args)
{
char c='0';
int n=10;
char ch[]=new char[n];
Arrays.fill(ch,c);
String s=new String(ch);
System.out.println(s);
}
}
output:
0000000000
No comments:
Post a Comment