Someone Bought Contributor Access for:
Topic 1 - Exam A SC-900
Auckland, 1 minute ago
Question #1 Topic 1
Given the code fragment:
and
Which is true?
A. The program prints t1 : 1 : t2 : 1: t1 : 2 : t2 : 2 : in random order. Most Voted
B. The program prints t1 : 1 : t2 : 1: t1 : 2 : t2 : 2 :
C. The program prints t1 : 1 : t2 : 1: t1 : 1 : t2 : 1 : indefinitely.
D. The program prints an exception.
Correct Answer: A
Community vote distribution
A (100%)
Question #2 Topic 1
Which statement is true?
A. IllegalStateException is thrown if a thread in waiting state is moved back to runnable.
B. A thread in waiting state consumes CPU cycles.
C. After the timed wait expires, the waited thread moves to the terminated state.
Someone Bought Contributor Access for:
D. A thread in waiting state must handle InterruptedException. Most Voted SC-900
Auckland, 1 minute ago
Correct Answer: D
Community vote distribution
D (100%)
Question #3 Topic 1
Daylight Saving Time (DST) is the practice of advancing clocks at the start of spring by one hour and adjusting them backward by one hour in
autumn.
Considering that in 2021, DST in Chicago (Illinois) ended on November 7th at 2 AM, and given the fragment:
What is the output?
A. true
true
B. false
true
C. true
false Most Voted
D. false
false
Correct Answer: C
Community vote distribution
C (100%)
Question #4 Topic 1
Given the code fragment:
Someone Bought Contributor Access for:
SC-900
Auckland, 1 minute ago
What is the result?
A. Can't logout Most Voted
B. Logged out at: 2021-01-12T21:58:00z
C. A compilation error occurs at line n1.
D. Logged out at: 2021-01-12T21:58:19.880z
Correct Answer: A
Community vote distribution
A (100%)
Next Questions
Browse atleast 50% to increase passing rate
Viewing page 1 out of 13 pages.
Viewing questions 1-4 out of 50 questions
Question #5 Topic 1
Given the code fragment:
What is the result?
A. PT5000SPT60MP6D
B. PT5SPT1MP6D Most Voted
C. 5S1M6D
D. 5000S60M6D
Correct Answer: B
Community vote distribution
B (100%)
Question #6 Topic 1
Given the code fragment:
Which action enables the code to compile?
A. Replace record with void.
B. Replace record with class.
C. Remove the regNo initialization statement.
D. Make the regNo variable public.
E. Make the regNo variable static. Most Voted
Correct Answer: E
Community vote distribution
E (100%)
Question #7 Topic 1
Given:
What is the result?
A. 0 CLOUDY
B. 1 SNOWY
C. 0 SNOWY Most Voted
D. 1 RAINY
E. Compilation fails
Correct Answer: C
Community vote distribution
C (100%)
Question #8 Topic 1
Given the code fragment:
What is the result?
A. 0 1 1 0
B. false true true Optional[NewYear] Most Voted
C. 0 1 0 Optional[NewYear]
D. true true false NewYear
Correct Answer: B
Community vote distribution
B (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 2 out of 13 pages.
Viewing questions 5-8 out of 50 questions
Question #9 Topic 1
Given:
Which statement is true while the program prints GC?
A. Both the objects previously referenced by t1 are eligible for garbage collection.
B. None of the objects are eligible for garbage collection.
C. Only the object referenced by t2 is eligible for garbage collection.
D. Only one of the objects previously referenced by t1 is eligible for garbage collection. Most Voted
Correct Answer: D
Community vote distribution
D (100%)
Question #10 Topic 1
Given:
What is the result?
A. Compilation fails.
B. there
C. hello Most Voted
D. A NumberFormatException is thrown.
Correct Answer: C
Community vote distribution
C (100%)
Question #11 Topic 1
Given the code fragment:
Which set of class definitions compiles?
A. interface Story extends SInt {}
interface Art extends SInt {}
B. public interface Story extends SInt {}
public interface Art extends SInt {}
C. sealed interface Story extends SInt {}
non-sealed class Art implements SInt {}
D. non-sealed interface Story extends SInt {}
non-sealed interface Art extends SInt {} Most Voted
E. non-sealed interface Story extends SInt {}
class Art implements SInt {}
Correct Answer: D
Community vote distribution
D (100%)
Question #12 Topic 1
Given:
What is the result?
A. mA
B. mB
mA
C. mB
D. mB
mC Most Voted
Correct Answer: D
Community vote distribution
D (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 3 out of 13 pages.
Viewing questions 9-12 out of 50 questions
Question #13 Topic 1
Given the code fragment:
What is the result?
A. ABBCDE // the order of elements is unpredictable
B. ABCDE
C. ABCDE // the order of elements is unpredictable Most Voted
D. ADEABCB // the order of elements is unpredictable
Correct Answer: C
Community vote distribution
C (100%)
Question #14 Topic 1
Given:
What is the result?
A. {bicycle=7, car=7, motorcycle=7, truck=7}
B. {3:bicycle, 0:car, 6:motorcycle, 5:truck}
C. Compilation fails.
D. {bicycle=1, car=3, motorcycle=1, truck=2} Most Voted
E. {bicycle, car, motorcycle, truck}
Correct Answer: D
Community vote distribution
D (100%)
Question #15 Topic 1
Which statement is true about modules?
A. Only unnamed modules are on the module path.
B. Automatic and named modules are on the module path. Most Voted
C. Only automatic modules are on the module path.
D. Only named modules are on the module path.
E. Automatic and unnamed modules are on the module path.
Correct Answer: B
Community vote distribution
B (100%)
Question #16 Topic 1
Given the code fragment:
Which code at line n1, obtains the [Link] object?
A. Console console = [Link]();
B. Console console = [Link](); Most Voted
C. Console console = new Console([Link]);
D. Console console = new Console(new InputStreamReader([Link]));
E. Console console = [Link]([Link]);
Correct Answer: B
Community vote distribution
B (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 4 out of 13 pages.
Viewing questions 13-16 out of 50 questions
Someone Bought Contributor Access for:
Question #17 220-1102 Topic 1
Pune, 1 minute ago
Given the content of the [Link] file:
0123456789
and the code fragment:
What is the content of the [Link] file?
A. 012345678
B. 01234567801234
C. 01234567
D. 0123456789
E. 012345678901234
F. 0123456789234567 Most Voted
Correct Answer: F
Community vote distribution
F (100%)
Question #18 Topic 1
Given the code fragment:
Someone Bought Contributor Access for:
220-1102
Pune, 1 minute ago
What is the result?
A. true:true:false:false
B. true:false:true:false
C. true:false:true:true
D. true:false:false:false Most Voted
Correct Answer: D
Community vote distribution
D (100%)
Question #19 Topic 1
Given the code fragment:
What is the result?
A. 888
B. 8109
C. 7107
D. 777 Most Voted
E. 71010
F. 81111
Correct Answer: D
Community vote distribution
D (100%)
Question #20 Topic 1
Given:
Someone Bought Contributor Access for:
220-1102
Pune, 1 minute ago
What is the result?
A. 4 Most Voted
B. 2
C. 6
D. Compilation fails.
E. A runtime exception is thrown.
F. Nothing is printed because of an indefinite loop.
G. 5
H. 3
Correct Answer: A
Community vote distribution
A (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 5 out of 13 pages.
Viewing questions 17-20 out of 50 questions
Someone Bought Contributor Access for:
Question #21 AZ-400 Topic 1
Warsaw, 1 minute ago
Given the code fragment:
What is the result?
A. Range1 -
Range2 -
Range3 -
Range1 -
Not a valid rank.
B. Range1 -
Not a valid rank.
C. Range1 -
Range2 -
Range3
D. Range1
Correct Answer: D
Community vote distribution
D (100%)
Question #22 Topic 1
Given the code fragment:
List<Integer> listOfNumbers = [Link](1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
Which code fragment returns different values?
A. int sum = [Link]().reduce(0, Integer::sum) + 5;
Someone Bought Contributor Access for:
B. int sum = [Link]().reduce(0, Integer::sum) + 5 ;
AZ-400
C. int sum = [Link]().reduce((m, n) -> m + n).orElse(5) + 5;
Warsaw, 1 minute ago
D. int sum = [Link]().reduce(5, Integer::sum); Most Voted
E. int sum = [Link]().reduce(5, (a, b) -> a+ b);
Correct Answer: D
Community vote distribution
D (100%)
Question #23 Topic 1
Given:
What is the result?
A. 100
100
1000
B. 101
101
1000
C. 1001
100
1000 Most Voted
D. 1001
1001
1000
Correct Answer: C
Community vote distribution
C (100%)
Question #24 Topic 1
Given the code fragment:
Someone Bought Contributor Access for:
AZ-400
Warsaw, 1 minute ago
What is the result?
A. 1
-4 Most Voted
B. 2
-2
C. 1
D. 2
Correct Answer: A
Community vote distribution
A (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 6 out of 13 pages.
Viewing questions 21-24 out of 50 questions
Someone Bought Contributor Access for:
Question #25 SC-300 Topic 1
Bogota, 1 minute ago
Given the code fragment:
Which two statements at Line n1 independently enable you to print 1250? (Choose two.)
A. Integer res = 250 + [Link](s);
B. Integer res = 250 + [Link](s);
C. Integer res = 250 + s2; Most Voted
D. Integer res = 250;
res =+ s2; Most Voted
E. Integer res = 250 + s;
F. Integer res = 250 + Integer(s2);
Correct Answer: CD
Community vote distribution
CD (100%)
Question #26 Topic 1
Given the code fragment:
Someone Bought Contributor Access for:
SC-300
Bogota, 1 minute ago
What is the result?
A. false 0
true 1 Most Voted
B. false 1
false 2
C. true 1
false 2
D. false 1
true 2
Correct Answer: A
Community vote distribution
A (100%)
Question #27 Topic 1
Assume you have an automatic module from the module path [Link].
Which name is given to the automatic module based on the given JAR file?
A. display-ascii-0
B. display-ascii
C. [Link] Most Voted
D. display-ascii-0.2
Correct Answer: B
Community vote distribution
C (100%)
Question #28 Topic 1
Which statement is true about migration?
A. Every module is moved to the module path in a bottom-up migration.
B. Every module is moved to the module path in a top-down migration. Most Voted
C. Unnamed modules are automatic modules in a top-down migration.
Someone Bought Contributor Access for:
D. The required modules migrate before the modules that depend on them in a top-down migration. SC-300
Bogota, 1 minute ago
Correct Answer: D
Community vote distribution
B (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 7 out of 13 pages.
Viewing questions 25-28 out of 50 questions
Question #29 Topic 1
Which statement is true?
A. The lock() method returns a boolean indicator immediately regardless if it has or has not managed to acquire the lock.
B. The lock() method returns a boolean indicator immediately if it has managed to acquire the lock, otherwise it waits for the lock acquisition.
C. The tryLock() method returns a boolean indicator immediately if it has managed to acquire the lock, otherwise it waits for the lock
acquisition.
D. The tryLock() method returns a boolean indicator immediately regardless if it has or has not managed to acquire the lock.
Correct Answer: D
Community vote distribution
D (100%)
Question #30 Topic 1
Given the code fragment:
Which code fragment invokes all callable objects in the workers set?
A.
B. [Link](cThreads);
C.
D.
Most Voted
Correct Answer: D
Community vote distribution
D (100%)
Question #31 Topic 1
Assuming that the [Link] file exists and has the following content: text1 text2 text3
Given the code fragment:
What is the result?
A. text1-
text2-
text3-
text3
B. text1-text2-text3
A [Link] is thrown. Most Voted
C. text1-text2-text3
text1
text2
text3
D. text1-text2-text3
text3
Correct Answer: B
Community vote distribution
B (100%)
Question #32 Topic 1
Given:
Which action enables the code to compile?
A. Replace 2 with static String name; Most Voted
B. Replace 7 with public static void display(String design) {
C. Replace 3 with private static void display() {
D. Replace 15 with [Link]("Flower");
Correct Answer: A
Community vote distribution
A (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 8 out of 13 pages.
Viewing questions 29-32 out of 50 questions
Question #33 Topic 1
Given:
and the code fragment:
What is the result?
A. Marketing Most Voted
B. Marketing -
Finance -
Technical
C. Marketing -
UnDefined
D. UnDefined
Correct Answer: A
Community vote distribution
A (100%)
Question #34 Topic 1
Given:
What is the result?
A. B A D
B. D A D Most Voted
C. B A C
D. D D D
Correct Answer: B
Community vote distribution
B (100%)
Question #35 Topic 1
Given:
What is the result?
A. runsruns
B. flipsruns Most Voted
C. runsflips
D. Compilation fails.
E. flipsflips
Correct Answer: B
Community vote distribution
B (100%)
Question #36 Topic 1
Given:
Which two method invocations execute? (Choose two.)
A. new MyC().m2(); Most Voted
B. IFace.m4();
C. IFace myClassObj = new MyC();
myClassObj.m3();
D. IFace myClassObj = new MyC();
myClassObj.m4();
E. IFace.m3(); Most Voted
F. IFace.m2();
Correct Answer: AE
Community vote distribution
AE (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 9 out of 13 pages.
Viewing questions 33-36 out of 50 questions
Question #37 Topic 1
Given the directory structure:
Given the definition of the Doc class:
Which two are valid definitions of the WordDoc class? (Choose two.)
A. package p1.p2;
public non-sealed class WordDoc extends Doc { }
B. package p1;
public final class WordDoc extends Doc {} Most Voted
C. package p1;
non-sealed abstract class WordDoc extends Doc {}
D. package p1.p2:
public sealed class WordDoc extends Doc { }
E. package p1;
public class WordDoc extends Doc {}
F. package p1;
public non-sealed class WordDoc extends Doc {} Most Voted
Correct Answer: BF
Community vote distribution
BF (100%)
Question #38 Topic 1
Given:
What is the result?
A. Compilation fails.
B. wTablewChair TableChair Most Voted
C. TableChair TableChair
D. A RuntimeException is thrown.
E. wTableChair TableChair
Correct Answer: B
Community vote distribution
B (67%) A (33%)
Question #39 Topic 1
Given:
and
Which two should the module-info file include for it to represent the service provider interface? (Choose two.)
A. exports [Link]; Most Voted
B. provides [Link] to [Link];
C. requires [Link];
D. exports [Link];
E. requires [Link];
F. exports [Link];
G. provides [Link] with [Link]; Most Voted
Correct Answer: AG
Community vote distribution
AG (100%)
Question #40 Topic 1
Which two code fragments compile? (Choose two.)
A.
B.
C.
D.
E.
F.
Correct Answer: AE
Community vote distribution
AE (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 10 out of 13 pages.
Viewing questions 37-40 out of 50 questions
Someone Bought Contributor Access for:
Question #41 CSA Topic 1
Chennai, 1 minute ago
Given the Product class:
and the Shop class:
What is the result?
A. Compilation fails.
B. Cookie 0.0 2.99 Most Voted
C. Cookie 2.99 2.99
D. Cookie 3.99 2.99
E. An exception is produced at runtime.
F. Cookie 0.0 0.0
Correct Answer: B
Community vote distribution
B (100%)
Question #42 Topic 1
Given the code fragments:
Someone Bought Contributor Access for:
CSA
Chennai, 1 minute ago
and:
Which action prints Wagon : 200?
A. At line n1, implement the [Link] interface.
B. At line n3, replace Car with LuxuryCar.
C. At line n1, implement the [Link] interface.
D. At line n3, replace readObject() with readLine().
E. At line n2, in the main method signature, add throws IOException, ClassNotFoundException. Most Voted
F. At line n2, in the main method signature, add throws IOException, ClassCastException.
Correct Answer: E
Community vote distribution
E (100%)
Question #43 Topic 1
Given:
Someone Bought Contributor Access for:
CSA
Chennai, 1 minute ago
What is the result?
A. Software Game read error
B. Software Game Chess 0
C. Software Game Software Game Chess 2
D. Software Game Chess 2 Most Voted
E. Software Game write error
F. Software Game Software Game Chess 0
Correct Answer: D
Community vote distribution
D (100%)
Question #44 Topic 1
Given:
[Link] file:
user = UserName
Captions_en.properties file:
user = User name (EN)
Captions_US.properties file: Someone Bought Contributor Access for:
message = User name (US) CSA
Captions_en_US.properties file:
Chennai, 1 minute ago
message = User name (EN - US)
and the code fragment:
What is the result?
A. User name (EN - US)
B. The program throws a MissingResourceException.
C. UserName
D. User name (EN) Most Voted
E. User name (US)
Correct Answer: D
Community vote distribution
D (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 11 out of 13 pages.
Viewing questions 41-44 out of 50 questions
Someone Bought Contributor Access for:
Question #45 AZ-400 Topic 1
Prague, 1 minute ago
Given:
and the code fragment:
Which statement is true?
A. The program throws ClassCastException.
B. The program fails to compile.
C. The program throws StockException.
D. The program throws OutofStockException. Most Voted
Correct Answer: D
Community vote distribution
D (100%)
Question #46 Topic 1
Given:
Someone Bought Contributor Access for:
AZ-400
Prague, 1 minute ago
Which two modifications enable the code to print Open Close?
A. Replace line n1 with:
class Folder extends Closeable {
B. Replace line n1 with:
class Folder implements AutoCloseable { Most Voted
C. At line n2, insert:
D. Replace line n1 with:
class Folder extends Exception {
E. At line n2, insert:
Correct Answer: B
Community vote distribution
B (100%)
Question #47 Topic 1
Given:
Someone Bought Contributor Access for:
AZ-400
Prague, 1 minute ago
and the code fragment:
What is the result?
A. 100.00
CellPhone,ToyCar,Motor,Fan
B. 100.00
CellPhone,ToyCar
C. 300.00
CellPhone,ToyCar
D. 300.00
CellPhone,ToyCar,Motor,Fan
Correct Answer: D
Community vote distribution
D (100%)
Question #48 Topic 1
Given the code fragment:
Someone Bought Contributor Access for:
AZ-400
Prague, 1 minute ago
Which action sorts the book list?
A. At Line n2, replace [Link]() with [Link]().sort().
B. At Line n1, convert books type to mutable ArrayList type. Most Voted
C. At Line n2, replace compareTo() with compare().
D. At Line n1, convert books type to mutable array type.
Correct Answer: B
Community vote distribution
B (100%)
Previous Questions Next Questions
Browse atleast 50% to increase passing rate
Viewing page 12 out of 13 pages.
Viewing questions 45-48 out of 50 questions
Question #49 Topic 1
Given the course table:
Given the code fragment:
What is the result?
A. 2 Most Voted
B. true
C. false
D. 1
Correct Answer: A
Community vote distribution
A (100%)
Question #50 Topic 1
Given the code fragment:
What is the result?
A. Cat -
Dog
B. Cat -
Cat Most Voted
C. Dog -
Dog
D. A NullPointerException is thrown.
E. Cat -
null
Correct Answer: B
Community vote distribution
B (100%)
Browse atleast 50% to increase passing rate
Previous Questions
Viewing page 13 out of 13 pages.
Viewing questions 49-50 out of 50 questions