We can use any of the following options based on the requirements to accept data from the user in corejava and show them
- Integer Input Output
- Character Input Output
- Float Input Output
INPUT AND OUTPUT EXAMPLE I with the help of scanner reader
import java.util.Scanner;
class student
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
System.out.println("Enter your rollno");
int rollno=sc.nextInt();
System.out.println("Enter your name");
String name=sc.next();
System.out.println("Enter your fee");
double fee=sc.nextDouble();
System.out.println("Rollno:"+rollno+" name:"+name+" fee:"+fee);
sc.close();
}
}