How To Get Input From User In Java

How To Get Input From User In Java

How To Get Input From User In Java


how to get input from user in java,string input in java,java get user input,java command line input,taking input in java


Java with input in Java Program

import java.io.*;
class arun
{
public Static void main(String args[]) throws IOException
{
DataInputStream in = new DataInputStream(System.in);
{
int a,b,c;
System.out.println("Enter the value of a and b is:");
a=Integer.parseInt(in.readLine());
b=Integer.parseInt(in.readLine());
c=a+b;
System.out.println("The value of c is:"+c);

}

Post a Comment

0 Comments