This is the mail archive of the mauve-discuss@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Existing testsclasses for "Scanner" ?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]