Computer Science, asked by shashikalasingh9836, 1 month ago

write a java program to print students details (name,class,father's name,mother's name,date of birth) in different lines.​

Answers

Answered by hiitsarnav
4

Answer:

public class Myself

{

public static void main(String args[]) throws IOException {

InputStreamReader read = new InputStreamReader(System.in);

BufferedReader in = new BufferedReader(read);

System.out.print("Enter your name: ");

String name = in.readLine();

System.out.print("Enter your Father's name: ");

String father = in.readLine();

System.out.print("Enter your DOB");

String DOB = in.readLine();

System.out.print("CLASS ");

String class = Long.parseLong(in.readLine());

System.out.println("My name: " + name);

System.out.println("Father's name: " + father);

System.out.println("DOB: " + DOB);

System.out.println("Class: " + class);

}

Similar questions