Array Program
Write a program to get 5 names and print them in java.
Answers
Answered by
3
Answer:
class NameArray
{
public static void main(String args[]) throws IOException
{
BufferedReader BF= new BufferedReader(new InputStreamReader (System.in));
String Str[]=new String[5];
int i;
System.out.println("Enter Five Names : ");
for(i=0;i<=4;i++)
{
Str[i]=BF.readLine();
}
System.out.println("Names Entered are : ");
for(i=0;i<=4;i++)
{
System.out.println(Str[i]);
}
}
}
MARK ME BRAINLIEST✨✨✨✨✨✨✨
Similar questions