Answer:
public String bananaSplit(int insertIdx, String insertText) {
return word.substring(0, insertIdx) + insertText + word.substring(insertIdx);
}
Explanation:
Do you have the other parts of the WordGames class?
Answer:
if(y==10)
{
x=0; // assigning 0 to x if y equals 10.
}
else
{
x=1; // assigning 1 to x otherwise.
}
Explanation:
In the if statement i have used equal operator == which returns true if value to it's right is equal to value to it's left otherwise false.By using this operator checking value of y and if it is 10 assigning 0 to x and if it is false assigning 1 to x.
Answer:
function start(){
var age = readInt("Age: ");
if(age == 15){
println("Yes, you are a teenager.");
}else{
println("No, you are not a teenager.");
}
}
Explanation:
Answer:
Don't mix business and personal files, group it by category or date. Create folder templates.