D
Daniel H.
Gast
Hi
Folgendes:
Der Quellcode ist noch nicht vollständig, aber ich habe beim compilieren folgendes Problem welches ich nicht beseitigen kann:
Vorkommen.java:10: unexpected type
required: variable
found : value
if (txt.charAt(+x) = a) {
^
1 error
Process completed.
Ich benutze den JCreator V3 LE und Java SDK 1.4.2 und laut SDK Docs, hab ich alles richtig gemacht.
HILFE!
Gruß
Daniel
Folgendes:
Code:
import Prog1Tools.*;
public class Vorkommen {
public static void main (String[]args){
String txt;
int x;
String a = "a";
x=0;
txt = IOTools.readLine("Gib einen Text ein");
if (txt.charAt(+x) = a) {
x++;
}
System.out.println(+x);
}
}
Vorkommen.java:10: unexpected type
required: variable
found : value
if (txt.charAt(+x) = a) {
^
1 error
Process completed.
Ich benutze den JCreator V3 LE und Java SDK 1.4.2 und laut SDK Docs, hab ich alles richtig gemacht.
HILFE!
Gruß
Daniel