
thisisme
Erfahrenes Mitglied
- 49
Hallo, wie kann ich in strings Zeichen wie { [ ( benutzen, ohne das sie als Java-Code interpretiert werden? Ich möchte z.B. das folgender Quellcode als Text angezeigt wird:
Ich hab es wie folgt in der strings.xml versucht:
Allerdings gibts gefühlte 1000 Fehler dabei...
Code:
public void insertion (int[] e){
for (p=i;p>0;p--){
if ((e[p]<e[p-1])){
tausche(e,p,p-1);
}
}
}
}
Code:
<string name="insertionSort">public void insertion (int[] e){
for (p=i;p>0;p--){
if ((e[p]<e[p-1])){
tausche(e,p,p-1);
}
}
}
}</string>