Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 16: -- Given the following declarations: StringBuilder buffer = new StringBuilder(Testing Testing); buffer.setLength(7); buffer.ensureCapacity(5); Which of the following is true? buffer has capacity 5.

Question 16: -- Given the following declarations: StringBuilder buffer = new StringBuilder(Testing Testing); buffer.setLength(7); buffer.ensureCapacity(5); Which of the following is true? buffer has capacity 5. buffer has capacity 31. buffer has content Testing. buffer has length 15. Flag this Question

Question 17: -- To find the character at a certain index position within a String, use the method getChars, with the index as an argument getCharAt, with the index as an argument charAt, with the index as an argument charAt, with the character you are searching for as an argument Flag this Question

Question 18: -- Consider the Java segment: String line1 = new String("c = 1 + 2 + 3") ; StringTokenizer tok = new StringTokenizer(line1); int count = tok.countTokens(); The value of count is ________. 8 7 13 4 Flag this Question

Question 19: -- Which of the following statements is false? Storage of data variables and arrays is temporary. Data is lost when a local variable goes out of scope. Files are used for long-term retention of large amounts of data. Data maintained in files is often called transient data. Flag this Question

Question 20: -- Streams that input bytes from and output bytes to files are known as ________. bit-based streams byte-based streams character-based streams Unicode-based streams Flag this Question

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions