import java.io.*;
class nstudio
{
String s[];
int num;
nstudio(int m)
{
s= new String[10];
num=m;
}
void getdata()throws IOException
{
BufferedReader br= new BufferedReader( new InputStreamReader(System.in));
System.out.println("Enter "+num+" Names : ");
for(int i=0;i<num;i++)
{
System.out.print(i+1+ " : ");
s[i]=br.readLine();
}
}
void dispdata()
{
System.out.println("\n The Entered Names are :");
for(int i=0;i<num;i++)
{
System.out.println(i+1+" : "+s[i]);
}
}
public static void main(String[] args)throws IOException
{
nstudio n= new nstudio(10);
n.getdata();
n.dispdata();
}
}
0 comments:
Post a Comment