Ich hab ein Programm geschrieben und es über die Konsole ausgeführt.
Folgende Fehlermeldung: function.java:8: cannot find symbol
symbol: variable x
location: class function
System.out.println ("fx=+x)
2errors
Ich habe versucht den Fehler auszubessern, wenn ich es aber jetzt über die Konsole ausführe passiert rein gar nichts
Quelltext: [JAVA=42]public class function{
public static int funktion(int x){
int wert = x*5+6;
return wert;
}
public static void main(String[] args){
System.out.println("fx=+x");
}}[/code]
Bitte um Hilfe
P.S. Sorry für die Noobfrage aber ich fang erst an
Folgende Fehlermeldung: function.java:8: cannot find symbol
symbol: variable x
location: class function
System.out.println ("fx=+x)
2errors
Ich habe versucht den Fehler auszubessern, wenn ich es aber jetzt über die Konsole ausführe passiert rein gar nichts
Quelltext: [JAVA=42]public class function{
public static int funktion(int x){
int wert = x*5+6;
return wert;
}
public static void main(String[] args){
System.out.println("fx=+x");
}}[/code]
Bitte um Hilfe
P.S. Sorry für die Noobfrage aber ich fang erst an
Zuletzt bearbeitet von einem Moderator: