Podcast
Questions and Answers
What is used in Java 5 and above to allow the user to enter their own values for the program?
What is used in Java 5 and above to allow the user to enter their own values for the program?
What is the problem with the program Add2Numbers.java mentioned in the text?
What is the problem with the program Add2Numbers.java mentioned in the text?
Which package does the Scanner class belong to?
Which package does the Scanner class belong to?
What does the * in 'import java.util.*;' indicate?
What does the * in 'import java.util.*;' indicate?
Signup and view all the answers
What do you need to create first in order to use the Scanner class?
What do you need to create first in order to use the Scanner class?
Signup and view all the answers
Which class allows reading keyboard input in a convenient manner in Java?
Which class allows reading keyboard input in a convenient manner in Java?
Signup and view all the answers
Which method of the Scanner class is used to read in an integer?
Which method of the Scanner class is used to read in an integer?
Signup and view all the answers
What does the following line of code do: c = keyboardIn.next().charAt(0);
What does the following line of code do: c = keyboardIn.next().charAt(0);
Signup and view all the answers
How is a string literal defined?
How is a string literal defined?
Signup and view all the answers
In Java, how can you create an instance of the Scanner class?
In Java, how can you create an instance of the Scanner class?
Signup and view all the answers
What does the method keyboardIn.nextDouble()
do?
What does the method keyboardIn.nextDouble()
do?
Signup and view all the answers
How is a value assigned to a string variable in Java?
How is a value assigned to a string variable in Java?
Signup and view all the answers
What does the nextLine() method of the Scanner class do?
What does the nextLine() method of the Scanner class do?
Signup and view all the answers
Which class represents objects of string literals in Java?
Which class represents objects of string literals in Java?
Signup and view all the answers
What is used to construct a Scanner object for reading input from the keyboard?
What is used to construct a Scanner object for reading input from the keyboard?
Signup and view all the answers
What is used to represent the keyboard in Java?
What is used to represent the keyboard in Java?
Signup and view all the answers
Which method reads a line up until it reaches a white space?
Which method reads a line up until it reaches a white space?
Signup and view all the answers
What does the following line of code do: firstName = new String();
?
What does the following line of code do: firstName = new String();
?
Signup and view all the answers