Hallo, ich versuche mit der while eine Schleife zu erstellen, sodass sich die Klasse wiederholt.
vllt. könnt ihr mir dabei helfen ? LG
vllt. könnt ihr mir dabei helfen ? LG
Code:
import java.util.Scanner;
public class tettete {
public static void main(String[ ] args) {
String[][] table ={
{"1","4","3"},
{"4","5","6"},
{"7","8","9"},
};
for (int i = 0; i < table.length; i++)
{
for (int j = 0; j < table[i].length; j++)
{
System.out.printf(table[ i][j] + " ");
}
System.out.println( );}
Scanner T = new Scanner (System.in);
System.out.print("Nummer:");
String x;
x= T.nextLine();
int Zahl = Integer.parseInt(x);
if(Zahl == 5){
System.out.println("eingegebene Nummer = 5");
}
}}