*Based on answer choices A-E, what is the code's output?
8. Which of the following can match a, b, c, or e?
A. [abc]
B. [-abc]
C. [?abc]
D. [*abc]
E. [^abc]
*Based on answer choices A-E, what is the code's output?
6. Given the following code, the output is __.
String str = "Java";
System.out.print(str.concat("programming"));
A. Java programming
B. Javaprogramming
C. Java programming !
D. Javaprogramming!
E. !
*Based on answer choices A-E, what is the code's output?
4. Given the following code, the output is __.
String str = new String("persistent");
System.out.print(str.indexOf('e'));
A. 0
B. 1
C. 2
D. 3
E. 4
*Based on answer choices A-E, what is the code's output?
2. Given the following code, the output is __.
String str1 = new String("Apple");
String str2 = "Apple";
System.out.print(str1.equals(str2));
A. 0
B. 1
C. false
D. true
E. str2
Write a program that takes a number from the user and pass that number to a user defined function. The function displays the table of that number.
*Based on answer choices A-E, what is the code's output?
9. Which describes to check if the letter "a" occurs n times only?
A. a?
B. a+
C. a=
D. a{n}
E. a(n)
*Based on answer choices A-E, what is the code's output?
7. Given the following code, the output is __.
String str = "Nakamori Akina";
System.out.print(str.replaceAll("a", "o"));
A. Nkmri kin
B. NakamoriAkina
C. Nokomori Akino
D. Nokomori Okino
E. Nakamari Akina
*Based on answer choices A-E, what is the code's output?
5. Given the following code, the output is __.
String str = "Yellowstone National Park";
System.out.print(str.length());
A. 15
B. 25
C. 30
D. 20
E. 35
Write a program that asks the user to enter an integer and determines whether it is divisible by 5 and
6, whether it is divisible by 5 or 6, and whether it is divisible by 5 or 6 but not both.
*Based on answer choices A-E, what is the code's output?
#3- Given the following code, the output is __.
String str = new String("flower");
System.out.print(str.charAt(5));
A. 5
B. e
C. w
D. o
E. r