import java.util.*; public class HelloWorld { public static void main(String[] args) { // define System.in as input device Scanner sc = new Scanner(System.in); //System.out.println("Buchstabe 119 = "+(char)119); // read a number from keyboard String number = sc.nextLine(); int num = 0; // a loop to adress each letter separately for (int i=0; i='0' && number.charAt(i)<='9') { // calculate old number*10 + new_digit num = 10*num + (number.charAt(i)-'0'); System.out.println("number["+i+"] = "+num ); } } /* String s = "RömischeZiffern"; for (int i=0; i=18) { System.out.println("Sie sind volljährig!"); } else { System.out.println("Du bist noch jung."); } */ /* // TODO Auto-generated method stub int result=5*3+3; double pi = 3.1415927; String s = "Buchstaben"+"salat"; System.out.println("Ergebnis="+ result); System.out.println("s="+s); System.out.println("pi = " + pi) */ } }