StringPlay.java,
StringPlay.html
x contains "milk"
y contains "juice"
temp
- String x, y, temp;
- ...
- x = ____.getText();
- y = ____.getText();
- _____.setText(x + " and " + y " before");
- ...
- temp = x;
- x = y;
- y = temp;
- ...
- _____.setText(x + " and " + y " after");
- ...
PigLatin.java,
PigLatin.html
String toUpperCase())
public class IntField extends TextField
{
public IntField();
public IntField(int size);
public void setInt(int number);
public int getInt();
}
public class DoubleField extends TextField
{
public DoubleField();
public DoubleField(int size);
public void setDouble(double num);
public Double getDouble();
}
Numbers.java,
Numbers.html
| <compound statement> | -> | {
| | | //a sequence of <statements>s
| | | each followed by a semicolon//
| | | }
| |
pigLatin = tail + firstL + "ay";
EXAMPLE: <statement> -> <identifier> = <expression>; -> pigLatin = <expression>; -> pigLatin = <str expression>; -> pigLatin = <str expression> + <str expression>; -> pigLatin = tail + <str expression>; -> pigLatin = tail + <str expression> + <str expression>; -> pigLatin = tail + firstL + <str expression>; -> pigLatin = tail + firstL + "ay";