Write a java program to print your names 5 times.
USING DATA INPUTSTREAM
Answers
Answered by
0
import java.io.*;
public class KeyboardReading1
{
public static void main(String args[]) throws IOException
{
DataInputStream dis = new DataInputStream(System.in);
System.out.println("Enter your name: ");
String str1 = dis.readLine();
for (int x =0; x <5; x++)
System.out.println("I know your name is " + str1);
dis.close();
}
}
Similar questions
Science,
8 months ago
Accountancy,
8 months ago
English,
1 year ago
Political Science,
1 year ago
Hindi,
1 year ago