Archive for the ‘Java Example’ Category

How to Take Input in Java ?

Posted on October 19th, 2008, by admin

import java.io.*;
class Add
{
public static void main(String[] args) throws IOException
{
int i,j;
BufferedReader br = new BufferedReader(new inputStreamReader(System.in));
System.out.println(“Enter First Number: “);
i = Integer.parseInt(br.readLine());
System.out.println(“Enter First Number: “);
j = Integer.parseInt(br.readLine());
System.out.println(i + ” + ” +     read more…