String Class Quiz
star
star
star
star
star
Last updated over 1 year ago
5 questions
DIRECTIONS : Fill in each blank with the proper java code.
public class LetterFun
{
private String word;
public LetterFun(String s)
{
///Blank One///
}
public void setString(String s)
{
///Blank Two///
}
public char getLastLetter()
{
///Blank Three///
}
public char getFirstLetter()
{
///Blank Four///
}
public String toString()
{
///Blank Five///
}
}
//code in the main of another class
LetterFun getIt = new LetterFun("Spider");
System.out.println(getIt.getFirstLetter());
System.out.println(getIt.getLastLetter());
System.out.println(getIt);
20
Write code for blank 1
Write code for blank 1
20
Write code for blank 2
Write code for blank 2
30
Write code for blank 3
Write code for blank 3
20
Write code for blank 4
Write code for blank 4
10
Write code for blank 5
Write code for blank 5