Цель программы замена литералов на литералы public class Sm0 public St

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
Цель программы - замена литералов L на литералы k
public class Sm0 {
public String stroka (String text) {
int check;
String sum;
String text="We must changed literals L on literals k . We must make changed." ;
for(int i=o, i<text.length, i++) {
check=String.valueOf(charAt(i));
if(check.equals("L")) { check=k; }
sum+=check;
System.out.println("sum");
return sum;
}
}
public static void main(String[] args) {
new Sm0();
}
}
Ошибки :
D:\Program Files\Java\jdk1.6.0_10\bin>javac Sm0.java
Sm0.java:11: ';' expected
for(int i=o, i<text.length, i++) {
^
Sm0.java:11: > expected
for(int i=o, i<text.length, i++) {
^
Sm0.java:11: ';' expected
for(int i=o, i<text.length, i++) {
^
Sm0.java:11: illegal start of expression
for(int i=o, i<text.length, i++) {
^
Sm0.java:11: ')' expected
for(int i=o, i<text.length, i++) {
^
Sm0.java:13: illegal start of expression
check=String.valueOf(charAt(i));
^
Sm0.java:13: ';' expected
check=String.valueOf(charAt(i));
^
Sm0.java:13: illegal start of expression
check=String.valueOf(charAt(i));
^
Sm0.java:13: ';' expected
check=String.valueOf(charAt(i));
^
Sm0.java:13: ';' expected
check=String.valueOf(charAt(i));
^
Sm0.java:29: class, interface, or enum expected
public static void main(String[] args) {
^
Sm0.java:34: class, interface, or enum expected
}
^
12 errors