/*
* Program to accept 5 strings on Terminal window
*/
import java.io.*;
public class yps1
{
public static void main(String args[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String name[]=new String[5];
int i,j;
System.out.println("Enter five names");
for(i=0; i<5; i++)
{
name[i]=br.readLine();
}
for(j=0; j<5; j++)
{
System.out.println("NAME "+ (j+1) + " :"+ name[j]);
}
}
}
* Program to accept 5 strings on Terminal window
*/
import java.io.*;
public class yps1
{
public static void main(String args[]) throws IOException
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String name[]=new String[5];
int i,j;
System.out.println("Enter five names");
for(i=0; i<5; i++)
{
name[i]=br.readLine();
}
for(j=0; j<5; j++)
{
System.out.println("NAME "+ (j+1) + " :"+ name[j]);
}
}
}
maam there is 1 with parameters also.
ReplyDeletethank you very much didi!
ReplyDelete