Steeve is currently working in a job portal. His mode of work is, store the registration details like name, qualification, age, phone number, email id and no of years of experience if any of a job seeker. The system will register all the details given and save it in the portal. Implement the scenario and display the output as shown in the sample.
for this solution
Answers
Answer:
import java.util. Scanner;
public class RegistrationDetails{ /*here change the "RegestrationDetails" into whatever source file you have created like if it is Main.java then change it into "Main" */
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
System.out.println("Enter your name:");
String name=sc.nextLine();
System.out.println("Enter your age:");
int age=sc.nextInt();
sc.nextLine(); // absence of this line causes error
System.out.println("Enter your phoneno:");
String pno=sc.nextLine();
System.out. println("Enter your qualification:");
String qualification=sc.nextLine();
System.out.println("Enter your email id[Please provide valid id, after registering your registration id will be mailed]:");
String email=sc.nextLine();
System.out.println("Enter your noofexperience[if any]:");
String noe=sc.nextLine();
System.out.println("Dear "+name+", Thanks for registering in our portal, registration id will be mailed to "+email+" within 2 working days");
}}
Explanation: