Services
Discover
Homeschooling
Ask a Question
Log in
Sign up
Filters
Done
Question type:
Essay
Multiple Choice
Short Answer
True False
Matching
Topic
Computing
Study Set
Big Java Binder Early Objects
Quiz 11: Inputoutput and Exception Handling
Path 4
Access For Free
Share
All types
Filters
Study Flashcards
Practice Exam
Learn
Question 41
Multiple Choice
The Scanner class's ____ method is used to specify a pattern for word boundaries when reading text.
Question 42
Multiple Choice
Consider the following code snippet: Scanner in = new Scanner(. . .) ; In) useDelimiter("[^A-Za-z]+") ; What characters will be ignored and not read in when using this code?
Question 43
Multiple Choice
Consider the following code snippet. Scanner in = new Scanner(. . .) ; While (in.hasNextLine() ) { String input = in.nextLine() ; } Which of the following statements about this code is correct?
Question 44
Multiple Choice
Consider the following code snippet: Scanner in = new Scanner(. . .) ; In) useDelimiter("[^0-9]+") ; What characters will be ignored and not read in using this code?
Question 45
Multiple Choice
Assume that inputFile is a Scanner object used to read data from a text file which contains a number of lines. Each line contains an arbitrary number of words, with at least one word per line. Select an expression to complete the following code segment, which prints the last word in each line. while (inputFile.hasNextLine() ) { String word = ""; String line = inputFile.nextLine() ; Scanner words = new Scanner(line) ; While (_________________) { Word = words.next() ; } System.out.println(word) ; }
Question 46
Multiple Choice
Which String class method will remove spaces from the beginning and the end of a string?
Question 47
Multiple Choice
Which of the following statements about white space in Java is correct?
Question 48
Multiple Choice
Select an expression to complete the following statement, which is designed to construct a PrintWriter object to write the program output to a file named dataout.txt PrintWriter theFile = _______________________;