Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
unter anderem ... siehe mein letzter Postda fehlt eine geschweifte Klammer ne geschlossene.. richtig?
Nein, da gebe ich Cromon völlig Recht!trotzdem bitte noch code schicken wenns geht, bidde
do
Nein, alles was bei deinem Code das Problem ist ist das folgende:
Zu jeder { gehört eine }
// entweder
while( <BEDINGUNG> )
{
... // tue irgendwas
}
// oder
do
{
... // tue irgendwas
} while( <BEDINGUNG> )
import javax.swing.JOptionPane;
public class SchulaufgabenTestgepimpt
{
private static Object myInt;
private static String myString;
public static void main (String args [])
{
String text = "A*R.ProductionS";
for(int i = 1; i<2; i++)
{
for(int j = 1; j<3;j++)
{
if(j==2)
{
text = text + "Test";
}
}
text = text + "Code";
}
System.out.println(text);
int Laenge;
boolean Falscheingabe;
do {
Falscheingabe = false;
String RohrlängeCM = JOptionPane.showInputDialog("Bitte die Rohrlänge in CM angeben");
try{
Laenge=Integer.parseInt(RohrlängeCM);
} catch (Exception e){
JOptionPane.showMessageDialog(null, "Fehleingabe");
Falscheingabe = true;
}
}while(Falscheingabe == true);
int Breite;
Falscheingabe = false;
String RohrbreiteCM = JOptionPane.showInputDialog("Bitte die Rohrbreite in CM angeben");
try{
Breite=Integer.parseInt(RohrbreiteCM);
} catch (Exception e){
JOptionPane.showMessageDialog(null, "Fehleingabe");
Falscheingabe = true;
}
}while(Falscheingabe == true);
int Verschnitt;
Falscheingabe = false;
String RohrverschnittCM = JOptionPane.showInputDialog("Bitte den Rohrverschnitt in CM angeben");
try{
Verschnitt=Integer.parseInt(RohrverschnittCM);
} catch (Exception e){
JOptionPane.showMessageDialog(null, "Fehleingabe");
Falscheingabe = true;
}
}while (Falscheingabe == true);
int Rest;
Falscheingabe = false;
String RohrrestCM = JOptionPane.showInputDialog("Bitte den Rohrrest in CM angeben");
try{
Rest=Integer.parseInt(RohrrestCM);
} catch (Exception e){
JOptionPane.showMessageDialog(null, "Fehleingabe");
Falscheingabe = true;
}
}while(Falscheingabe == true);
System.out.println(Laenge);
System.out.println(Breite);
System.out.println(Verschnitt);
System.out.println(Rest);
try {
myInt = Integer.parseInt(myString);
}
catch(NumberFormatException e) {
System.out.println("Erfolgreiche Eingabe. Vielen Dank!");
}
}
}