P
pandit
Hello all,
thanks for solving my Old Problem now i m posting my problem here.
The Problem is that i m using "User Input" BufferReader and i m
getting input fro user
but when i m run this program this don't return me integer value here
i m doing addition of two integer but its not return me return value
wht's wrong with my Code
import java.io.*;
class inputread
{
public static void main(String args[]) throws IOException
{
BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
BufferedReader br1= new BufferedReader(new
InputStreamReader(System.in));
System.out.print("\t\tPlease Enter Value For A:- ");
int a,b,c;
a=(int)br.read();
System.out.print("\t\tPlease Enter Value For B:- ");
b=(int)br1.read();
c=a+b;
System.out.println("\t\tThe Sum Of A + B :- "+c);
}
if i m presing enter two times
it is giving me 26
13 for the Enter Value
now What i do
Thanks in Advance.
thanks for solving my Old Problem now i m posting my problem here.
The Problem is that i m using "User Input" BufferReader and i m
getting input fro user
but when i m run this program this don't return me integer value here
i m doing addition of two integer but its not return me return value
wht's wrong with my Code
import java.io.*;
class inputread
{
public static void main(String args[]) throws IOException
{
BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
BufferedReader br1= new BufferedReader(new
InputStreamReader(System.in));
System.out.print("\t\tPlease Enter Value For A:- ");
int a,b,c;
a=(int)br.read();
System.out.print("\t\tPlease Enter Value For B:- ");
b=(int)br1.read();
c=a+b;
System.out.println("\t\tThe Sum Of A + B :- "+c);
}
if i m presing enter two times
it is giving me 26
13 for the Enter Value
now What i do
Thanks in Advance.