This is the mail archive of the
mauve-discuss@sourceware.org
mailing list for the Mauve project.
Existing testsclasses for "Scanner" ?
- From: "theUser BL" <theuserbl at hotmail dot com>
- To: mauve-discuss at sources dot redhat dot com
- Date: Thu, 03 Nov 2005 11:31:19 +0000
- Subject: Existing testsclasses for "Scanner" ?
- Bcc:
Hi!
I have seen, that in Java 1.5 is something possible like
------
import java.util.*;
public class ScannerTest {
public static void main(String[] args) {
String name = new String();
int number1, number2, number3;
Scanner console = new Scanner(System.in);
System.out.print("Please input your name: ");
name = console.nextLine();
System.out.print("Hello "+name+", now input a number: ");
number1 = console.nextInt();
System.out.print("And a second number: ");
number2 = console.nextInt();
number3 = number1+number2;
System.out.println(number1+" + "+number2+" = "+number3);
}
}
------
Existing for Scanner already some test-classes?
I wanted only to know it. Sadly I can not myself program for Mauve, because
I am not a programmer.
The nice thing of Scanner is, that it is since 1.5 possible to input from
the console without "try", "catch" and other professional programmings.
Greatings
theuserbl