Consider the Java segment:

String line1 = new String("c = 1 + 2 + 3") ;
StringTokenizer tok = new StringTokenizer(line1, "+=");

String foo = tok.nextToken();
String bar = tok.nextToken();

The values of foo and bar are:
a. foo is “c ”, bar is “ = ”.
b. foo is “c”, bar is “ ”.
c. foo is “ = ”, bar is “ + ”.
d. foo is “c ”, bar is “ 1 ”.


d. foo is “c ”, bar is “ 1 ”.

Computer Science & Information Technology

You might also like to view...

Which of the following is not true about friend functions and friend classes?

a. A class can either grant friendship to or take friendship from another class using the friend keyword. b. A friend declaration can appear anywhere in a class definition. c. A friend of a class can access all of its private data member and member functions. d. The friendship relationship is neither symmetric nor transitive.

Computer Science & Information Technology

The ____ is a folder on your PC's hard disk that temporarily stores outgoing e-mail messages.

A. e-mail box B. Inbox C. Outbox D. Send folder

Computer Science & Information Technology

List the four essential TCP functions.

What will be an ideal response?

Computer Science & Information Technology

Which of the following is NOT one of the administrative challenges to the operation of firewalls?

A. training B. uniqueness C. replacement D. responsibility

Computer Science & Information Technology