
**What if there exists an application that needs a certain input and will give an output. Using Java, how can we invoke that application with an input and read the resulted output?**

Hi Friend,
Try this:
import java.util.*;
class ScannerExample
{
public static void main(String[] args)
{
Scanner input=new Scanner(System.in);
System.out.print("Enter integer: ");
int i=input.nextInt();
System.out.print("Enter double: ");
double d=input.nextDouble();
System.out.print("Enter float: ");
float f=input.nextFloat();
System.out.print("Enter string: ");
String s=input.next();
System.out.println(i);
System.out.println(d);
System.out.println(f);
System.out.println(s);
}
}
Hope that it will be helpful for you.
Thanks