write a program in java to print your name five times
Answers
Answered by
2
import java.io.*
class Abc
{
BufferedReader br=new BufferedReader( new InputStreamReader (System.in));
public void work ()throws IOException
{ String x;
System.out.println("Enter Your name");
x=br.readline();
for (i=1;i<=5;i++)
System.out.println(x);
}
}
class Abc
{
BufferedReader br=new BufferedReader( new InputStreamReader (System.in));
public void work ()throws IOException
{ String x;
System.out.println("Enter Your name");
x=br.readline();
for (i=1;i<=5;i++)
System.out.println(x);
}
}
Answered by
3
/*
* First Java program, which says "Hello, world!"
*/
public class Hello { // Save as "Hello.java"
public static void main(String[] args) {
System.out.println("Hello, world!"); // print message
}
}
Similar questions